Function at 0x402590
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x42c040]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x24], 0
cmp dword [ebp + 8], 0xffffffff
jne 0x4025ba
xor eax, eax
jmp 0x402c3f
cmp dword [ebp + 0x14], 0
jne 0x4025c6
lea ecx, [ebp - 8]
mov dword [ebp + 0x14], ecx
cmp dword [ebp - 0x10], 0x10000
jb 0x4025e1
mov edx, dword [ebp - 0x10]
cmp dword [edx + 8], 0
jne 0x4025ef
mov eax, dword [ebp - 0x10]
cmp dword [eax + 0xc], 0
jne 0x4025ef
mov dword [ebp + 0x14], 0
xor eax, eax
jmp 0x402c3f
cmp dword [ebp + 0x10], 0
jge 0x402613
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0x18], 0
mov edx, dword [ebp - 0x10]
mov dword [edx + 0xc], 0
mov eax, 1
jmp 0x402c3f
mov eax, dword [ebp + 0x14]
mov dword [eax], 0
cmp dword [ebp - 0x24], 0
jne 0x402c1e
cmp dword [ebp + 0x10], 0
jle 0x402c1e
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x10]
mov eax, dword [ecx + 0xc]
sub eax, dword [edx + 0x18]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp + 0x10]
cmp ecx, dword [ebp - 0x14]
jle 0x402ba4
cmp dword [ebp - 0x14], 0
jle 0x402696
cmp dword [ebp + 0xc], 0
je 0x402679
mov edx, dword [ebp - 0x14]
push edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x14]
mov edx, dword [ebp - 0x10]
add ecx, dword [edx + 0x18]
push ecx
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0xc]
add ecx, dword [eax]
push ecx
call fcn.0040a020
add esp, 0xc
mov edx, dword [ebp + 0x14]
mov eax, dword [edx]
add eax, dword [ebp - 0x14]
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
mov edx, dword [ebp + 0x10]
sub edx, dword [ebp - 0x14]
mov dword [ebp + 0x10], edx
mov dword [ebp - 0x14], 0
cmp dword [ebp - 0x14], 0
je 0x4026e1
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0xc]
cmp ecx, dword [ebp - 0x14]
jl 0x4026e1
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x10]
mov ecx, dword [edx + 0xc]
cmp ecx, dword [eax + 0x10]
jge 0x4026e1
mov edx, dword [ebp - 0x14]
push edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x14]
mov edx, dword [ebp - 0x10]
add ecx, dword [edx + 0x10]
sub ecx, dword [ebp - 0x14]
push ecx
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x14]
mov edx, dword [ebp - 0x10]
add ecx, dword [edx + 0xc]
sub ecx, dword [ebp - 0x14]
push ecx
call fcn.0040a020
add esp, 0xc
mov eax, dword [ebp - 0x10]
mov dword [eax + 0xc], 0
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0x18], 0
mov dword [ebp - 0xc], 0
mov edx, dword [ebp - 0x10]
cmp dword [edx + 8], 0
je 0x402735
mov eax, dword [ebp + 0x18]
push eax
lea ecx, [ebp - 0xc]
push ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x10]
sub eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x14]
push edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x402735
cmp dword [ebp - 0xc], 0
jne 0x40273e
mov dword [ebp - 0x24], 1
jmp 0x402754
mov eax, dword [ebp - 0xc]
cdq
mov ecx, dword [ebp - 0x10]
add eax, dword [ecx + 0x28]
adc edx, dword [ecx + 0x2c]
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0x28], eax
mov dword [ecx + 0x2c], edx
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x10]
sub eax, dword [ebp - 0x14]
cmp dword [ebp - 0xc], eax
je 0x402769
mov dword [ebp - 0x24], 2
mov ecx, dword [ebp - 0x10]
cmp dword [ecx + 0x44], 0
jg 0x4029c0
mov eax, dword [ebp - 0xc]
cdq
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], edx
mov edx, dword [ebp - 0x28]
mov eax, dword [edx + 0x28]
cmp eax, dword [ebp - 0x38]
jne 0x4029c0
mov ecx, dword [ebp - 0x28]
mov edx, dword [ecx + 0x2c]
cmp edx, dword [ebp - 0x34]
jne 0x4029c0
mov eax, dword [ebp - 0x10]
cmp dword [eax + 0x44], 0
jle 0x4027b9
mov ecx, dword [ebp - 0x10]
cmp dword [ecx + 0x44], 0xfeff
jne 0x40282c
cmp dword [ebp - 0xc], 1
jle 0x40282c
mov edx, 1
shl edx, 0
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x14]
movsx edx, byte [ecx + edx]
test edx, edx
je 0x402809
mov eax, 1
imul ecx, eax, 0
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x14]
movzx ecx, byte [eax + ecx]
cmp ecx, 0xff
jne 0x40282c
mov edx, 1
shl edx, 0
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x14]
movzx edx, byte [ecx + edx]
cmp edx, 0xfe
jne 0x40282c
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x44], 0xfeff
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0x18], 2
mov edx, dword [ebp - 0x10]
mov dword [edx + 0x48], 2
jmp 0x4029c0
mov eax, dword [ebp - 0x10]
cmp dword [eax + 0x44], 0
jle 0x40283e
mov ecx, dword [ebp - 0x10]
cmp dword [ecx + 0x44], 2
jne 0x40289a
cmp dword [ebp - 0xc], 1
jle 0x40289a
mov edx, 1
imul eax, edx, 0
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x14]
movzx eax, byte [edx + eax]
cmp eax, 0xfe
jne 0x40289a
mov ecx, 1
shl ecx, 0
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x14]
movzx ecx, byte [eax + ecx]
cmp ecx, 0xff
jne 0x40289a
mov edx, dword [ebp - 0x10]
mov dword [edx + 0x44], 2
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x18], 2
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0x48], 2
jmp 0x4029c0
mov edx, dword [ebp - 0x10]
cmp dword [edx + 0x44], 0
jle 0x4028af
mov eax, dword [ebp - 0x10]
cmp dword [eax + 0x44], 0xfde9
jne 0x402924
cmp dword [ebp - 0xc], 2
jle 0x402924
mov ecx, 1
imul edx, ecx, 0
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x14]
movzx edx, byte [ecx + edx]
cmp edx, 0xef
jne 0x402924
mov eax, 1
shl eax, 0
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x14]
movzx eax, byte [edx + eax]
cmp eax, 0xbb
jne 0x402924
mov ecx, 1
shl ecx, 1
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x14]
movzx ecx, byte [eax + ecx]
cmp ecx, 0xbf
jne 0x402924
mov edx, dword [ebp - 0x10]
mov dword [edx + 0x44], 0xfde9
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x18], 3
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0x48], 1
jmp 0x4029c0
mov edx, dword [ebp - 0x10]
cmp dword [edx + 0x44], 0
jle 0x402939
mov eax, dword [ebp - 0x10]
cmp dword [eax + 0x44], 0xfde8
jne 0x4029a3
cmp dword [ebp - 0xc], 2
jle 0x4029a3
mov ecx, 1
imul edx, ecx, 0
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x14]
movzx edx, byte [ecx + edx]
cmp edx, 0x2b
jne 0x4029a3
mov eax, 1
shl eax, 0
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x14]
movzx eax, byte [edx + eax]
cmp eax, 0x2f
jne 0x4029a3
mov ecx, 1
shl ecx, 1
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x14]
movzx ecx, byte [eax + ecx]
cmp ecx, 0x76
jne 0x4029a3
mov edx, dword [ebp - 0x10]
mov dword [edx + 0x44], 0xfde8
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x18], 3
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0x48], 1
jmp 0x4029c0
mov edx, dword [ebp - 0x10]
cmp dword [edx + 0x44], 0
jg 0x4029c0
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x44], 0
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0x48], 1
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
sub eax, dword [edx + 0x18]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jle 0x402b59
mov ecx, dword [ebp - 0x10]
cmp dword [ecx + 0x44], 0
je 0x402b59
mov dword [ebp - 0x18], 0
mov edx, dword [ebp - 0x10]
cmp dword [edx + 0x44], 2
jne 0x402a60
mov eax, dword [ebp - 0xc]
add eax, 0xa
mov ecx, 0xffffffff
cmovb eax, ecx
push eax
call fcn.0040ea3e
add esp, 4
mov dword [ebp - 0x18], eax
mov edx, dword [ebp - 0xc]
shr edx, 1
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], 0
jmp 0x402a27
mov eax, dword [ebp - 0x1c]
add eax, 1
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x1c]
cmp ecx, dword [ebp - 0x20]
jge 0x402a5b
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x14]
mov ecx, dword [ebp - 0x1c]
movsx edx, byte [eax + ecx*2]
shl edx, 8
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x14]
mov eax, dword [ebp - 0x1c]
movsx ecx, byte [ecx + eax*2 + 1]
or edx, ecx
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x18]
mov word [ecx + eax*2], dx
jmp 0x402a1e
jmp 0x402b19
mov edx, dword [ebp - 0x10]
cmp dword [edx + 0x44], 0xfeff
jne 0x402aad
mov eax, dword [ebp - 0xc]
add eax, 0xa
mov ecx, 0xffffffff
cmovb eax, ecx
push eax
call fcn.0040ea3e
add esp, 4
mov dword [ebp - 0x18], eax
mov edx, dword [ebp - 0xc]
shr edx, 1
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x14]
mov eax, dword [ebp - 0x10]
add edx, dword [eax + 0x18]
push edx
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.0040a020
add esp, 0xc
jmp 0x402b19
push 0
push 0
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x14]
mov edx, dword [ebp - 0x10]
add ecx, dword [edx + 0x18]
push ecx
push 0
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x44]
push ecx
call dword [0x431204]
mov dword [ebp - 0x20], eax
mov edx, dword [ebp - 0x20]
shl edx, 1
add edx, 0xa
mov eax, 0xffffffff
cmovb edx, eax
push edx
call fcn.0040ea3e
add esp, 4
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x20]
push ecx
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x14]
mov eax, dword [ebp - 0x10]
add edx, dword [eax + 0x18]
push edx
push 0
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x44]
push edx
call dword [0x431204]
nop
push 0
push 0
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x10]
sub ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x14]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
mov edx, dword [ebp - 0x18]
push edx
push 0
push 0
call dword [0x4311e8]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x18], 0
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.0040ea23
add esp, 4
cmp dword [ebp - 0x14], 0
je 0x402b85
mov edx, dword [ebp - 0x14]
push edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x14]
mov edx, dword [ebp - 0x10]
add ecx, dword [edx + 0x10]
sub ecx, dword [ebp - 0x14]
push ecx
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x14]
add ecx, dword [ebp - 0xc]
push ecx
call fcn.0040a020
add esp, 0xc
mov edx, dword [ebp - 0x14]
add edx, dword [ebp - 0xc]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
mov dword [eax + 0xc], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x14]
mov ecx, dword [ebp - 0x14]
mov byte [eax + ecx], 0
cmp dword [ebp - 0x24], 1
je 0x402c19
mov edx, dword [ebp - 0x14]
cmp edx, dword [ebp + 0x10]
jge 0x402bba
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x2c], eax
jmp 0x402bc0
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x2c], ecx
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0xc], edx
cmp dword [ebp + 0xc], 0
je 0x402bf4
cmp dword [ebp - 0xc], 0
je 0x402bf4
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x14]
mov eax, dword [ebp - 0x10]
add edx, dword [eax + 0x18]
push edx
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0xc]
add edx, dword [ecx]
push edx
call fcn.0040a020
add esp, 0xc
mov eax, dword [ebp + 0x10]
sub eax, dword [ebp - 0xc]
mov dword [ebp + 0x10], eax
mov ecx, dword [ebp + 0x14]
mov edx, dword [ecx]
add edx, dword [ebp - 0xc]
mov eax, dword [ebp + 0x14]
mov dword [eax], edx
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x18]
add edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x18], edx
jmp 0x40261c
mov ecx, dword [ebp + 0x14]
cmp dword [ecx], 0
jne 0x402c35
cmp dword [ebp - 0x24], 0
je 0x402c35
mov dword [ebp - 0x30], 0
jmp 0x402c3c
mov dword [ebp - 0x30], 1
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00409258
mov esp, ebp
pop ebp
ret