Function at 0x40af20
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x458678
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18
push ebx
push esi
mov ebx, ecx
push edi
mov dword [ebp - 0x14], ebx
mov dword [ebp - 4], 2
mov edi, dword [ebp + 0x14]
mov dword [edi], 0
mov dword [edi + 4], 0
mov eax, dword [0x476478]
mov dword [ebp + 0x14], eax
mov byte [ebp - 4], 3
lea eax, [ebp + 0x14]
push eax
push ecx
lea eax, [ebp + 0x10]
mov dword [ebp - 0x10], esp
mov ecx, esp
push eax
call fcn.00405440
mov byte [ebp - 4], 4
lea eax, [ebp + 0xc]
push ecx
mov ecx, esp
mov dword [ebp - 0x18], esp
push eax
call fcn.00405440
mov byte [ebp - 4], 5
lea eax, [ebp + 8]
push ecx
mov ecx, esp
mov dword [ebp - 0x1c], esp
push eax
call fcn.00405440
mov byte [ebp - 4], 6
mov byte [ebp - 4], 3
mov ecx, ebx
call fcn.00413550
mov esi, dword [ebp + 0x14]
or ebx, 0xffffffff
test eax, eax
je 0x40b007
mov eax, dword [esi - 8]
push 0
cdq
add dword [edi], eax
mov eax, dword [ebp + 0xc]
adc dword [edi + 4], edx
push 0
push 3
mov ecx, dword [eax - 8]
push 0
push 1
add ecx, ecx
push SysReAllocString
mov dword [eax - 4], ecx
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x10], eax
cmp eax, ebx
je 0x40b007
lea ecx, [ebp - 0x24]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
push dword [ebp - 0x10]
test eax, eax
jne 0x40b0d2
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
mov byte [ebp - 4], 2
lea eax, [esi - 0x20]
cmp eax, dword [0x476474]
je 0x40b02f
add esi, 0xffffffe0
mov eax, ebx
lock xadd dword [esi], eax
dec eax
test eax, eax
jg 0x40b02f
push esi
call fcn.004471aa
add esp, 4
mov byte [ebp - 4], 1
mov eax, dword [ebp + 8]
lea ecx, [eax - 0x20]
cmp ecx, dword [0x476474]
je 0x40b05e
lea ecx, [eax - 0x20]
mov eax, ebx
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x40b05e
mov eax, dword [ebp + 8]
add eax, 0xffffffe0
push eax
call fcn.004471aa
add esp, 4
mov byte [ebp - 4], 0
mov eax, dword [ebp + 0xc]
lea ecx, [eax - 0x20]
cmp ecx, dword [0x476474]
je 0x40b08d
lea ecx, [eax - 0x20]
mov eax, ebx
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x40b08d
mov eax, dword [ebp + 0xc]
add eax, 0xffffffe0
push eax
call fcn.004471aa
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0x10]
lea ecx, [eax - 0x20]
cmp ecx, dword [0x476474]
je 0x40b0bd
add eax, 0xffffffe0
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x40b0bd
mov ecx, dword [ebp + 0x10]
add ecx, 0xffffffe0
push ecx
call fcn.004471aa
add esp, 4
mov ecx, dword [ebp - 0xc]
mov eax, edi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ebp - 0x24]
add dword [edi], eax
mov eax, dword [ebp - 0x20]
adc dword [edi + 4], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x476478]
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 7
lea eax, [ebp - 0x10]
push eax
push ecx
lea eax, [ebp + 8]
mov dword [ebp - 0x1c], esp
mov ecx, esp
push eax
call fcn.00405440
mov byte [ebp - 4], 8
mov byte [ebp - 4], 7
mov ecx, dword [ebp - 0x14]
call fcn.004134d0
mov ecx, dword [ebp - 0x10]
test eax, eax
jne 0x40b11d
xor edi, edi
jmp 0x40b12b
mov eax, dword [ecx - 8]
cdq
add dword [edi], eax
adc dword [edi + 4], edx
mov edi, 1
mov byte [ebp - 4], 3
lea eax, [ecx - 0x20]
cmp eax, dword [0x476474]
je 0x40b009
add ecx, 0xffffffe0
mov eax, ebx
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x40b009
push ecx
call fcn.004471aa
add esp, 4
jmp 0x40b009