Function at 0x40b906
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x23dc
call fcn.0041dff0
push ebx
push esi
push edi
xor eax, eax
push eax
push eax
push 3
push eax
push 3
push 0x80000000
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0x14], edi
je 0x40bb8b
mov ebx, dword [ebp + 8]
lea esi, [ebx + 8]
mov dword [ebp - 0x18], esi
call fcn.0040ae48
push 0x20
lea eax, [ebp - 0x258]
push eax
push 0
push edi
call fcn.0040a8cd
add esp, 0x10
cmp byte [ebp - 0x240], 0x34
je 0x40bb84
push edi
mov ecx, ebx
call fcn.0040b7cd
push 0
push edi
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
mov dword [ebp - 0x10], eax
mov eax, 0x5000
cmp dword [ebp - 0x10], eax
mov dword [ebp - 4], eax
jbe 0x40bb84
call fcn.00416f0a
cmp dword [ebx + 0x28], 0
jne 0x40bb84
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 4]
lea esi, [ebp - 0x23d8]
push edi
call fcn.0040b875
test eax, eax
je 0x40bb71
mov ebx, dword [ebp - 0x23a4]
cmp ebx, 0x100
mov edi, dword [ebp - 0x239c]
mov esi, dword [ebp - 0x2394]
jbe 0x40b9da
push 0x68
pop ebx
mov eax, 0x2000
cmp edi, eax
jbe 0x40b9e5
mov edi, eax
cmp esi, eax
jbe 0x40b9eb
mov esi, eax
lea eax, [ebp - 0x1d8]
push eax
mov eax, 0x1b4
call fcn.0040a73c
mov eax, dword [ebp - 0x23b8]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x2384]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x23c8]
mov dword [ebp - 0x1d0], eax
mov eax, dword [ebp - 0x23c4]
mov dword [ebp - 0x1cc], eax
mov eax, dword [ebp - 0x23d0]
mov dword [ebp - 0x1d8], eax
mov eax, dword [ebp - 0x23cc]
pop ecx
lea ecx, [ebp + ebx - 0x23d8]
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x1d4], eax
mov al, byte [ebp - 0x23a0]
lea ecx, [ebp + esi - 0x23d8]
mov dword [ebp - 0x30], ecx
mov byte [ebp - 0x1c8], al
lea ecx, [ebp + edi - 0x23d8]
mov dword [ebp - 0x34], ecx
mov ecx, dword [ebp - 0x18]
movzx eax, al
call fcn.0040af11
test eax, eax
jne 0x40ba7d
mov eax, 0x41f4f3
push eax
push 9
pop ebx
lea edi, [ebp - 0x1c7]
call fcn.00409d78
push dword [ebp + 0xc]
lea esi, [ebp - 0x1be]
call fcn.00409fce
call fcn.00409ad8
mov ebx, 0x104
mov eax, edi
push ebx
push eax
mov edi, esi
call fcn.0040a8f7
call fcn.00409ad8
push ebx
push dword [ebp - 0x34]
call fcn.0040a8f7
mov esi, 0xff
xor ebx, ebx
push esi
lea eax, [ebp - 0x2d7]
push ebx
push eax
mov byte [ebp - 0x2d8], bl
call sub.msvcrt.dll_memset
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x2d8]
mov dword [ebp - 0xc], ebx
push esi
mov dword [ebp - 8], ebx
mov ebx, dword [ebp - 0x30]
push eax
call fcn.0040ac6e
add esp, 0x30
jmp 0x40bb56
cmp dword [ebp - 8], 0
jne 0x40bb10
lea eax, [ebp - 0x2d8]
push eax
push 0x3f
pop ebx
lea edi, [ebp - 0x79]
call fcn.00409d78
pop ecx
push str.content_type:
lea eax, [ebp - 0x2d8]
call fcn.00409bae
test eax, eax
pop ecx
jl 0x40bb3c
lea eax, [ebp + eax - 0x2ca]
push eax
push 0x3f
pop ebx
lea edi, [ebp - 0xb9]
call fcn.00409d78
pop ecx
mov ebx, dword [ebp - 0x30]
inc dword [ebp - 8]
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x2d8]
push esi
push eax
call fcn.0040ac6e
add esp, 0xc
test eax, eax
jne 0x40baf7
mov ecx, dword [ebp + 8]
mov eax, dword [ecx]
inc dword [ecx + 4]
lea edx, [ebp - 0x1d8]
push edx
call dword [eax]
mov ebx, dword [ebp + 8]
mov edi, dword [ebp - 0x14]
add dword [ebp - 4], 0x80
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0x10]
jb 0x40b98f
push edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
pop edi
pop esi
pop ebx
leave
ret 8