Function at 0x404310
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x4b81e8
push 0x46ae50
mov eax, dword fs:[0]
push eax
sub esp, 8
mov eax, 0x2238
call fcn.0046a620
mov eax, dword [0x4beb20]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov edi, edx
mov esi, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x2250], eax
mov dword [ebp - 0x2248], ecx
xor ebx, ebx
mov byte [ebp - 0x3c], bl
xor eax, eax
mov dword [ebp - 0x3b], eax
mov dword [ebp - 0x37], eax
mov dword [ebp - 0x33], eax
mov dword [ebp - 0x2f], eax
mov dword [ebp - 0x2b], eax
mov dword [ebp - 0x27], eax
mov dword [ebp - 0x23], eax
mov word [ebp - 0x1f], ax
mov byte [ebp - 0x1d], al
mov byte [ebp - 0x240], bl
push 0x1ff
push ebx
lea edx, [ebp - 0x23f]
push edx
call fcn.00468830
add esp, 0xc
mov dword [ebp - 0x2244], ebx
mov dword [ebp - 4], ebx
push ebx
lea eax, [ebp - 0x224c]
push eax
push 0x2000
lea ecx, [ebp - 0x2240]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, ebx
je 0x40456e
cmp dword [ebp - 0x224c], 0x2000
jb 0x40456e
lea ebx, [ebp - 0x2240]
call fcn.004064c0
test eax, eax
je 0x40456e
mov eax, dword [ebp - 0x2228]
shr eax, 8
mov ecx, esi
cmp al, 1
jne 0x40441f
lea edx, [ebp - 0x240]
call fcn.004040a0
test eax, eax
jne 0x40453c
mov dword [ebp - 0x2244], 0xc0000101
jmp 0x404578
lea edi, [ebp - 0x3c]
call fcn.004061a0
mov eax, 0x20
lea ecx, [ebp - 0x1fe4]
mov edx, edi
cmp eax, 4
jb 0x40447e
mov edi, dword [edx]
cmp edi, dword [ecx]
jne 0x40444a
sub eax, 4
add ecx, 4
add edx, 4
jmp 0x404434
movzx eax, byte [edx]
movzx edi, byte [ecx]
sub eax, edi
jne 0x404476
movzx eax, byte [edx + 1]
movzx edi, byte [ecx + 1]
sub eax, edi
jne 0x404476
movzx eax, byte [edx + 2]
movzx edi, byte [ecx + 2]
sub eax, edi
jne 0x404476
movzx eax, byte [edx + 3]
movzx edx, byte [ecx + 3]
sub eax, edx
sar eax, 0x1f
or eax, 1
jmp 0x404480
xor eax, eax
test eax, eax
jne 0x404410
lea ebx, [ebp - 0x2240]
movzx edi, word [ebx + 0x24f]
push edi
lea eax, [ebx + 0x4f]
push eax
lea ecx, [ebp - 0x240]
push ecx
call fcn.004688b0
add esp, 0xc
push edi
mov ecx, esi
lea edi, [ebp - 0x240]
call fcn.00406280
add esp, 4
lea edx, [ebp - 0x3c]
push edx
movzx eax, word [ebx + 0x24f]
push eax
mov ecx, edi
push ecx
call fcn.0043c990
add esp, 0xc
mov eax, 0x20
lea ecx, [ebx + 0x27c]
lea edx, [ebp - 0x3c]
jmp 0x4044e0
cmp eax, 4
jb 0x40452a
mov esi, dword [edx]
cmp esi, dword [ecx]
jne 0x4044f6
sub eax, 4
add ecx, 4
add edx, 4
jmp 0x4044e0
movzx eax, byte [edx]
movzx esi, byte [ecx]
sub eax, esi
jne 0x404522
movzx eax, byte [edx + 1]
movzx esi, byte [ecx + 1]
sub eax, esi
jne 0x404522
movzx eax, byte [edx + 2]
movzx esi, byte [ecx + 2]
sub eax, esi
jne 0x404522
movzx eax, byte [edx + 3]
movzx edx, byte [ecx + 3]
sub eax, edx
sar eax, 0x1f
or eax, 1
jmp 0x40452c
xor eax, eax
test eax, eax
je 0x40453c
mov dword [ebp - 0x2244], 0xc0000102
jmp 0x404578
mov ecx, dword [ebp - 0x2250]
test ecx, ecx
je 0x404578
lea eax, [ebp - 0x2240]
movzx edi, word [eax + 0x24f]
push edi
lea eax, [ebp - 0x240]
push eax
push ecx
call fcn.004688b0
add esp, 0xc
mov ecx, dword [ebp - 0x2248]
mov dword [ecx], edi
jmp 0x404578
mov dword [ebp - 0x2244], 0xc0000201
mov dword [ebp - 4], 0xfffffffe
call fcn.004045a6
mov eax, dword [ebp - 0x2244]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.004694b0
mov esp, ebp
pop ebp
ret