Function at 0x403f40
Capabilities:
Get file size
Read file on windows

Disassembly:
sub esp, 0x320
mov eax, dword [0x41f050]
xor eax, esp
mov dword [esp + 0x31c], eax
push ebx
push edi
xor ebx, ebx
push 0xff
lea eax, [esp + 0x19]
push ebx
push eax
mov byte [esp + 0x20], bl
call fcn.004100c0
push 0x104
lea ecx, [esp + 0x22d]
push ebx
push ecx
mov dword [esp + 0x20], ebx
mov byte [esp + 0x234], bl
call fcn.004100c0
push 0x104
lea edx, [esp + 0x131]
push ebx
push edx
mov byte [esp + 0x138], bl
call fcn.004100c0
add esp, 0x24
push 0x105
lea eax, [esp + 0x220]
push eax
push ebx
xor edi, edi
mov dword [esp + 0x1c], ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x403fde
pop edi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x31c]
xor ecx, esp
call fcn.004089ca
add esp, 0x320
ret
push ebx
push ebx
push 0x105
lea ecx, [esp + 0x120]
push ecx
push ebx
push ebx
push ebx
lea edx, [esp + 0x238]
push ebx
push edx
call fcn.0040a06c
add esp, 0x24
test eax, eax
jne 0x403fc5
lea eax, [esp + 0x114]
push esi
xor esi, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x404012
sub eax, edx
je 0x40405d
lea ecx, [ecx]
mov al, byte [esp + esi + 0x118]
cmp al, 0x30
jl 0x40402f
cmp al, 0x39
jle 0x404041
cmp al, 0x41
jl 0x404037
cmp al, 0x46
jle 0x404041
sub al, 0x61
cmp al, 5
ja 0x404317
lea eax, [esp + 0x118]
inc esi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x404050
sub eax, edx
cmp esi, eax
jb 0x404020
push ebp
push ebx
push ebx
push 3
push ebx
push 7
push 0x80000000
lea eax, [esp + 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
mov dword [esp + 0x14], ebp
cmp ebp, 0xffffffff
je 0x40434b
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
je 0x404337
push esi
call fcn.0040993e
mov edi, eax
add esp, 4
cmp edi, ebx
je 0x404337
push ebx
lea ecx, [esp + 0x1c]
push ecx
push esi
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x404337
cmp dword [esp + 0x18], esi
jne 0x404337
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x20]
push eax
mov ebp, 0x100
push 0x800c
mov ebx, esi
mov eax, edi
mov dword [esp + 0x1c], ebp
call fcn.00403d40
add esp, 0xc
test eax, eax
je 0x404117
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x120]
push edx
call fcn.00403ed0
add esp, 8
test eax, eax
je 0x404310
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x20]
push ecx
push 0x8004
mov eax, edi
mov dword [esp + 0x1c], ebp
call fcn.00403d40
add esp, 0xc
test eax, eax
je 0x404159
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x120]
push eax
mov eax, dword [esp + 0x18]
call fcn.00403ed0
add esp, 8
test eax, eax
je 0x404310
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x20]
push edx
push 0x8003
mov eax, edi
mov dword [esp + 0x1c], ebp
call fcn.00403d40
add esp, 0xc
test eax, eax
je 0x40419b
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x120]
push ecx
call fcn.00403ed0
add esp, 8
test eax, eax
je 0x404310
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x20]
push eax
push esi
push edi
mov dword [esp + 0x20], ebp
call fcn.00403bd0
add esp, 0x10
test eax, eax
je 0x4041d8
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x120]
push edx
call fcn.00403ed0
add esp, 8
test eax, eax
je 0x404310
lea eax, [esp + 0x10]
push eax
push esi
push edi
lea ebx, [esp + 0x28]
mov dword [esp + 0x1c], ebp
call fcn.00403cb0
add esp, 0xc
test eax, eax
je 0x404212
mov eax, dword [esp + 0x10]
mov ecx, ebx
push ecx
lea edx, [esp + 0x120]
push edx
call fcn.00403ed0
add esp, 8
test eax, eax
je 0x404310
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x20]
push ecx
push 0x8001
mov ebx, esi
mov eax, edi
mov dword [esp + 0x1c], ebp
call fcn.00403d40
add esp, 0xc
test eax, eax
je 0x404256
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x120]
push eax
mov eax, dword [esp + 0x18]
call fcn.00403ed0
add esp, 8
test eax, eax
je 0x404310
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x20]
push edx
push 0x8002
mov eax, edi
mov dword [esp + 0x1c], ebp
call fcn.00403d40
add esp, 0xc
test eax, eax
je 0x404294
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x120]
push ecx
call fcn.00403ed0
add esp, 8
test eax, eax
je 0x404310
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x20]
push eax
push 0x800d
mov eax, edi
mov dword [esp + 0x1c], ebp
call fcn.00403d40
add esp, 0xc
test eax, eax
je 0x4042d2
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x120]
push edx
call fcn.00403ed0
add esp, 8
test eax, eax
je 0x404310
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x20]
push ecx
push 0x800e
mov eax, edi
mov dword [esp + 0x1c], ebp
call fcn.00403d40
add esp, 0xc
test eax, eax
je 0x404331
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x120]
push eax
mov eax, dword [esp + 0x18]
call fcn.00403ed0
add esp, 8
test eax, eax
jne 0x404331
mov eax, 1
jmp 0x40434d
pop esi
pop edi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x31c]
xor ecx, esp
call fcn.004089ca
add esp, 0x320
ret
mov ebp, dword [esp + 0x14]
xor ebx, ebx
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, ebx
je 0x40434b
push edi
call fcn.0040954d
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x32c]
pop ebp
pop esi
pop edi
pop ebx
xor ecx, esp
call fcn.004089ca
add esp, 0x320
ret