Function at 0x40b0e0
Capabilities:
Get file size

Disassembly:
push 0xffffffffffffffff
push 0x4bb908
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
mov eax, dword [0x51eea4]
xor eax, dword [esp + 0x38]
push ebx
push ebp
mov ebx, ecx
mov dword [esp + 0x30], eax
mov al, byte [ebx + 0x10]
test al, al
push esi
push edi
je 0x40b117
mov eax, dword [ebx]
call dword [eax + 4]
mov ecx, dword [esp + 0x4c]
push ecx
lea edx, [esp + 0x20]
push edx
call fcn.004055b0
add esp, 8
mov ecx, dword [esp + 0x30]
xor eax, eax
cmp ecx, eax
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x44], eax
jle 0x40b171
jmp 0x40b140
cmp ecx, 0x10
mov edx, dword [esp + 0x20]
jae 0x40b14d
lea edx, [esp + 0x20]
cmp byte [edx + eax], 0x2f
jne 0x40b168
cmp ecx, 0x10
mov ecx, dword [esp + 0x20]
jae 0x40b160
lea ecx, [esp + 0x20]
mov byte [ecx + eax], 0x5c
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x30]
inc eax
cmp eax, edx
jl 0x40b140
mov edx, dword [esp + 0x50]
xor esi, esi
xor eax, eax
xor edi, edi
test dl, 1
je 0x40b18c
mov eax, 2
mov esi, 0x40000000
mov edi, eax
mov ebp, edx
and ebp, 2
mov dword [esp + 0x4c], ebp
je 0x40b1a6
mov eax, 4
mov esi, 0x40000000
mov edi, 3
test edx, edx
jne 0x40b1b9
mov eax, 3
mov esi, 0x80000000
mov edi, 1
cmp ecx, 0x10
mov ecx, dword [esp + 0x20]
jae 0x40b1c6
lea ecx, [esp + 0x20]
mov ebp, dword [sym.imp.kernel32.dll_CreateFileA]
push 0
push 0x10000080
push eax
push 0
push edi
push esi
push ecx
call ebp
cmp eax, 0xffffffff
mov dword [ebx + 0x34], eax
jne 0x40b244
mov eax, dword [esp + 0x4c]
test eax, eax
mov eax, dword [esp + 0x34]
je 0x40b220
cmp eax, 0x10
mov eax, dword [esp + 0x20]
jae 0x40b1fc
lea eax, [esp + 0x20]
push 0
push 0x10000080
push 2
push 0
push edi
push esi
push eax
call ebp
cmp eax, 0xffffffff
mov dword [ebx + 0x34], eax
jne 0x40b244
mov dword [ebx + 0x34], 0
jmp 0x40b2d8
cmp eax, 0x10
mov dword [ebx + 0x34], 0
jb 0x40b2ec
mov ecx, dword [esp + 0x20]
push ecx
call fcn.004ade5d
add esp, 4
xor al, al
jmp 0x40b314
mov edx, dword [ebx + 0x34]
push 0
push edx
call dword [sym.imp.kernel32.dll_GetFileSize]
cmp eax, 0xffffffff
jne 0x40b2f0
call dword [sym.imp.kernel32.dll_GetLastError]
push eax
lea ecx, [esp + 0x14]
call fcn.004015f0
mov esi, eax
lea eax, [esp + 0x4c]
push eax
mov byte [esp + 0x48], 1
call fcn.00408c00
mov ecx, eax
call fcn.004014f0
mov eax, dword [eax]
push 0x51ff63
push esi
push str.GetFileSize_failed.
push 0x51ff84
mov ecx, eax
mov byte [esp + 0x54], 2
call fcn.00401560
mov ecx, eax
call fcn.00403390
mov ecx, eax
call fcn.00403fa0
mov ecx, eax
call fcn.00403f50
mov eax, dword [esp + 0x4c]
test eax, eax
mov byte [esp + 0x44], 1
je 0x40b2d8
mov esi, dword [eax + 4]
mov ecx, eax
add eax, 4
dec esi
mov edx, esi
test edx, edx
mov dword [eax], esi
jne 0x40b2d8
mov edx, dword [ecx]
push 1
call dword [edx]
cmp dword [esp + 0x34], 0x10
jb 0x40b2ec
mov eax, dword [esp + 0x20]
push eax
call fcn.004ade5d
add esp, 4
xor al, al
jmp 0x40b314
mov dword [ebx + 0xc], eax
cmp dword [esp + 0x34], 0x10
mov dword [ebx + 8], 0
mov byte [ebx + 0x10], 1
jb 0x40b312
mov ecx, dword [esp + 0x20]
push ecx
call fcn.004ade5d
add esp, 4
mov al, 1
mov ecx, dword [esp + 0x3c]
pop edi
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x34]
xor ecx, dword [esp + 0x44]
pop esi
pop ebp
pop ebx
call fcn.004ae650
add esp, 0x38
ret 8