Function at 0x40b670
Capabilities:
Get file size

Disassembly:
push ebx
push ebp
push esi
mov esi, dword [esp + 0x14]
push edi
push 0
push 0x80
push 3
push 0
push 0
push MenuHelp
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [0x422f78], eax
jne 0x40b6ca
push esi
push str._s_open_error_
push 0x423020
call dword [sym.imp.USER32.dll_wsprintfA]
mov eax, dword [esp + 0x20]
add esp, 0xc
push 0x10
push 0
push 0x423020
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
test eax, eax
mov dword [0x422ff4], eax
jne 0x40b70b
push esi
push str._s_open_error
push 0x423020
call dword [sym.imp.USER32.dll_wsprintfA]
mov ecx, dword [esp + 0x20]
add esp, 0xc
push 0x10
push 0
push 0x423020
push ecx
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
push 0x7f02
push 0
call dword [sym.imp.USER32.dll_LoadCursorA]
mov ebp, dword [sym.imp.USER32.dll_SetCursor]
push eax
mov dword [0x422e5c], eax
call ebp
mov edi, dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov dword [0x422ffc], eax
mov eax, dword [esp + 0x2c]
cmp eax, 1
je 0x40b776
cmp eax, 2
jne 0x40b7af
or al, 0xff
mov ecx, dword [0x41f820]
mov byte [0x41fa08], al
test ecx, ecx
jne 0x40b79c
mov edx, dword [0x422ff0]
push edx
call edi
test eax, eax
mov dword [0x422f50], eax
je 0x40b7af
mov edx, dword [0x422fd4]
xor ecx, ecx
test edx, edx
jbe 0x40b792
jmp 0x40b77f
xor al, al
jmp 0x40b747
mov eax, dword [0x422f50]
mov dl, byte [0x41fa08]
mov byte [eax + ecx], dl
mov eax, dword [0x422fd4]
inc ecx
cmp ecx, eax
jb 0x40b77a
mov eax, dword [0x422ff0]
push eax
call ebx
jmp 0x40b7af
mov ecx, dword [0x422fd4]
push eax
dec ecx
push ecx
push 0
call fcn.004049f0
add esp, 0xc
mov esi, dword [esp + 0x14]
mov dword [0x422fb8], 0
push esi
call fcn.00413220
mov eax, dword [0x41f820]
add esp, 4
test eax, eax
jne 0x40b7fd
mov edx, dword [0x422ff0]
push edx
call edi
test eax, eax
mov dword [0x422f50], eax
jne 0x40b7fd
mov eax, dword [0x422f78]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [0x422ffc]
push ecx
call ebp
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
mov eax, dword [esp + 0x1c]
mov dword [0x41fa64], 0
cmp eax, 7
ja case.default.0x40b810
jmp dword [eax*4 + 0x40b8ec]
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
push edx
push eax
push ecx
push esi
call fcn.0040b910
add esp, 0x10
mov edi, eax
jmp 0x40b88b
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
push edx
push eax
push ecx
push esi
call fcn.0040bad0
add esp, 0x10
mov edi, eax
jmp 0x40b88b
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
push edx
push eax
push ecx
push esi
call fcn.0040bd80
add esp, 0x10
mov edi, eax
jmp 0x40b88b
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
push edx
push eax
push ecx
push esi
call fcn.0040c010
add esp, 0x10
mov edi, eax
jmp 0x40b88b
mov edi, dword [esp + 0x28]
mov eax, dword [0x41f820]
test eax, eax
jne 0x40b89d
mov edx, dword [0x422ff0]
push edx
call ebx
cmp dword [0x41fa64], 1
jne 0x40b8b6
push 0x10
push 0
push str.Some_BIN_code_out_of_range__
push esi
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [0x422ff4]
push esi
mov dword [0x422fb8], eax
call fcn.00413220
add esp, 4
call fcn.00413300
mov ecx, dword [0x422f78]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [0x422ffc]
push edx
call ebp
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret