Function at 0x409adc
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x40
push esi
push ebx
mov eax, dword [esp + 0x4c]
push 0
push eax
call fcn.00409658
add esp, 8
test eax, eax
je 0x40a08d
cmp dword [0x41cc34], 1
jle 0x409b13
push 0x41c9b0
call fcn.00417194
add esp, 4
jmp 0x40a08d
mov eax, dword [0x41e708]
push eax
call fcn.0040c960
push 0
push pe_nt_image_headers32
push 3
push 0
push 1
push 0x80000000
push 0x41c9b0
call sub.kernel32.dll_CreateFileA
mov dword [0x41c9ac], eax
add esp, 4
cmp eax, 0xffffffff
je 0x40a05c
push 0
push 0x41d0d0
push 4
push 0x41d0cc
push eax
call sub.kernel32.dll_ReadFile
test eax, eax
je 0x40a05c
mov esi, dword [0x41d0d0]
cmp esi, 4
jne 0x40a05c
mov edx, dword [0x41d0cc]
lea eax, [edx + 0x21352200]
cmp eax, 1
ja 0x409d93
push 0
push 0x41d0d0
push 0x40
lea eax, [esp + 0x14]
push eax
mov eax, dword [0x41c9ac]
push eax
call sub.kernel32.dll_ReadFile
test eax, eax
je 0x40a05c
cmp dword [0x41d0d0], 0x40
jne 0x40a05c
movsx eax, word [esp + 0xa]
add eax, 0xfb7
mov dword [0x426920], eax
movsx eax, word [esp + 0xc]
mov dword [0x426924], eax
movsx eax, word [esp + 0xe]
mov dword [0x426928], eax
movsx eax, word [esp + 0x10]
mov dword [0x426804], eax
movsx eax, word [esp + 0x12]
mov dword [0x41dcf0], eax
movsx eax, word [esp + 0x14]
mov dword [0x423c50], eax
movsx eax, word [esp + 0x16]
mov dword [0x425010], eax
movsx eax, word [esp + 0x18]
mov dword [0x425080], eax
cmp eax, 7
jne 0x409c37
movsx eax, word [esp + 0x1a]
movsx edx, word [esp + 0x1c]
mov dword [0x425078], eax
mov eax, edx
shl eax, 4
sub eax, edx
shl eax, 2
lea ecx, [esp + 0x1e]
mov dword [0x42507c], eax
jmp 0x409c3b
lea ecx, [esp + 0x1e]
movsx eax, word [ecx]
add ecx, 2
mov dword [0x41c454], eax
movsx edx, word [ecx]
mov eax, edx
shl eax, 4
sub eax, edx
shl eax, 2
add ecx, 2
mov dword [0x41c458], eax
movsx edx, word [ecx]
add eax, edx
add ecx, 2
mov dword [0x41c458], eax
movsx eax, word [ecx]
add ecx, 2
mov dword [0x41c45c], eax
movsx edx, word [ecx]
mov eax, edx
shl eax, 4
sub eax, edx
shl eax, 2
add ecx, 2
mov dword [0x41c460], eax
movsx edx, word [ecx]
add eax, edx
add ecx, 2
mov dword [0x41c460], eax
movsx eax, word [ecx]
add ecx, 2
mov dword [0x425084], eax
movsx eax, word [ecx]
mov dword [0x42476c], eax
movsx eax, word [ecx + 2]
mov dword [0x424770], eax
push 0
push 0x41d0d0
push 8
push 0x41c44c
mov eax, dword [0x41c9ac]
push eax
call sub.kernel32.dll_ReadFile
test eax, eax
je 0x409d60
mov eax, dword [0x41d0d0]
cmp eax, 8
jne 0x409d60
push 0
push 0x41d0d0
push eax
push 0x41c468
mov eax, dword [0x41c9ac]
push eax
call sub.kernel32.dll_ReadFile
test eax, eax
je 0x409d60
cmp dword [0x41d0d0], 8
jne 0x409d60
push 0
push 0x41d0d0
push 0x66
push 0x423240
mov eax, dword [0x41c9ac]
push eax
call sub.kernel32.dll_ReadFile
test eax, eax
je 0x409d60
cmp dword [0x41d0d0], 0x66
jne 0x409d60
push 0
push 0x41d0d0
push 0x4e20
mov eax, dword [0x423c74]
push eax
mov eax, dword [0x41c9ac]
push eax
call sub.kernel32.dll_ReadFile
test eax, eax
je 0x409d60
mov edx, dword [0x423c74]
movsx eax, word [edx + 4]
add eax, eax
cmp dword [0x41d0d0], eax
je 0x409d6a
call fcn.00413564
jmp 0x40a05c
cmp dword [0x42476c], 0
jne 0x409d7d
mov eax, dword [0x423c50]
mov dword [0x42476c], eax
cmp dword [0x424770], 0
jne 0x409fe5
movsx eax, word [edx + 4]
jmp 0x409fe0
cmp edx, 0xdecade
jne 0x40a05c
push 0
push 0x41d0d0
push 0x40
lea ebx, [esp + 0x14]
push ebx
mov eax, dword [0x41c9ac]
push eax
call sub.kernel32.dll_ReadFile
test eax, eax
je 0x40a05c
cmp dword [0x41d0d0], 0x40
jne 0x40a05c
push 0x20
push ebx
call fcn.00409ac0
movsx eax, word [esp + 0x12]
mov dword [0x425010], eax
movsx eax, word [esp + 0x16]
mov dword [0x41dcf0], eax
movsx eax, word [esp + 0x18]
add eax, 0xfb7
mov dword [0x426920], eax
movsx eax, word [esp + 0x1a]
mov dword [0x426924], eax
movsx eax, word [esp + 0x1c]
mov dword [0x426928], eax
movsx eax, word [esp + 0x22]
movsx edx, word [esp + 0x24]
mov dword [0x425078], eax
mov eax, edx
shl eax, 4
sub eax, edx
shl eax, 2
mov dword [0x42507c], eax
movsx eax, word [esp + 0x26]
mov dword [0x41c454], eax
movsx eax, word [esp + 0x28]
mov ecx, eax
shl ecx, 4
sub ecx, eax
movsx eax, word [esp + 0x2a]
mov dword [0x41c45c], eax
movsx eax, word [esp + 0x2c]
mov edx, eax
shl edx, 4
movsx ebx, word [esp + 0x2e]
sub edx, eax
movsx eax, word [esp + 0x30]
mov dword [0x425084], 0
mov dword [0x426804], eax
shl ecx, 2
movsx eax, word [esp + 0x34]
mov dword [0x41c458], ecx
mov dword [0x425080], eax
shl edx, 2
movsx eax, word [esp + 0x36]
mov dword [0x41c460], edx
add ecx, eax
movsx eax, word [esp + 0x38]
mov dword [0x423c50], ebx
add edx, eax
mov dword [0x41c458], ecx
mov dword [0x41c460], edx
mov dword [0x42476c], ebx
push 0
push 0x41d0d0
push 8
push 0x41c44c
mov eax, dword [0x41c9ac]
push eax
call sub.kernel32.dll_ReadFile
add esp, 8
test eax, eax
je 0x40a05c
mov ebx, dword [0x41d0d0]
cmp ebx, 8
jne 0x40a05c
push 2
push 0x41c44c
call fcn.00409a7c
push 0
push 0x41d0d0
push ebx
push 0x41c468
mov eax, dword [0x41c9ac]
push eax
call sub.kernel32.dll_ReadFile
add esp, 8
test eax, eax
je 0x40a05c
cmp dword [0x41d0d0], 8
jne 0x40a05c
push 2
push 0x41c468
call fcn.00409a7c
push 0
push 0x41d0d0
push 0x66
push 0x423240
mov eax, dword [0x41c9ac]
push eax
call sub.kernel32.dll_ReadFile
add esp, 8
test eax, eax
je 0x40a05c
cmp dword [0x41d0d0], 0x66
jne 0x40a05c
push 0x33
push 0x423240
call fcn.00409ac0
push 0
push 0x41d0d0
push 0x4e20
mov eax, dword [0x423c74]
push eax
mov eax, dword [0x41c9ac]
push eax
call sub.kernel32.dll_ReadFile
add esp, 8
test eax, eax
je 0x40a05c
cmp dword [0x41d0d0], 7
jbe 0x40a05c
push esi
mov eax, dword [0x423c74]
push eax
call fcn.00409ac0
mov ecx, dword [0x423c74]
movsx edx, word [ecx + 4]
add esp, 8
mov eax, edx
add eax, edx
cmp dword [0x41d0d0], eax
jne 0x40a05c
lea eax, [edx - 4]
push eax
lea eax, [ecx + 8]
push eax
call fcn.00409ac0
mov eax, dword [0x423c74]
movsx eax, word [eax + 4]
add esp, 8
mov dword [0x424770], eax
mov eax, dword [0x41c9ac]
push eax
call sub.kernel32.dll_CloseHandle
test eax, eax
je 0x40a05c
mov eax, dword [0x41e5cc]
push eax
call fcn.0040c960
push 0x41cab4
call fcn.004108c8
mov ecx, 2
add esp, 8
mov edx, dword [0x423c74]
mov ebx, dword [0x424770]
movsx eax, word [edx + 6]
cmp eax, ebx
jge 0x40a03d
mov eax, edx
cmp word [edx + ecx*2 + 2], 0
jle 0x40a03d
movsx ecx, word [edx + ecx*2 + 2]
movsx eax, word [eax + ecx*2 + 2]
cmp eax, ebx
jl 0x40a025
push ecx
call fcn.00418d04
call fcn.00401264
call fcn.004016c8
call fcn.0040d3c4
mov eax, 1
add esp, 4
jmp 0x40a08d
mov eax, dword [0x41c9ac]
cmp eax, 0xffffffff
je 0x40a06c
push eax
call sub.kernel32.dll_CloseHandle
mov eax, dword [0x41e5cc]
push eax
call fcn.0040c960
push 0x41c9b0
push 0
call fcn.004094f8
call fcn.00409590
xor eax, eax
add esp, 0xc
pop ebx
pop esi
add esp, 0x40
ret