Function at 0x4037e0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x42d040]
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 0x40380a
xor eax, eax
jmp 0x403e8f
cmp dword [ebp + 0x14], 0
jne 0x403816
lea ecx, [ebp - 8]
mov dword [ebp + 0x14], ecx
cmp dword [ebp - 0x10], 0x10000
jb 0x403831
mov edx, dword [ebp - 0x10]
cmp dword [edx + 8], 0
jne 0x40383f
mov eax, dword [ebp - 0x10]
cmp dword [eax + 0xc], 0
jne 0x40383f
mov dword [ebp + 0x14], 0
xor eax, eax
jmp 0x403e8f
cmp dword [ebp + 0x10], 0
jge 0x403863
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0x18], 0
mov edx, dword [ebp - 0x10]
mov dword [edx + 0xc], 0
mov eax, 1
jmp 0x403e8f
mov eax, dword [ebp + 0x14]
mov dword [eax], 0
cmp dword [ebp - 0x24], 0
jne 0x403e6e
cmp dword [ebp + 0x10], 0
jle 0x403e6e
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 0x403df4
cmp dword [ebp - 0x14], 0
jle 0x4038e6
cmp dword [ebp + 0xc], 0
je 0x4038c9
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.0040b1c0
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 0x403931
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0xc]
cmp ecx, dword [ebp - 0x14]
jl 0x403931
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x10]
mov ecx, dword [edx + 0xc]
cmp ecx, dword [eax + 0x10]
jge 0x403931
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.0040b1c0
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 0x403985
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 0x403985
cmp dword [ebp - 0xc], 0
jne 0x40398e
mov dword [ebp - 0x24], 1
jmp 0x4039a4
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 0x4039b9
mov dword [ebp - 0x24], 2
mov ecx, dword [ebp - 0x10]
cmp dword [ecx + 0x44], 0
jg 0x403c10
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 0x403c10
mov ecx, dword [ebp - 0x28]
mov edx, dword [ecx + 0x2c]
cmp edx, dword [ebp - 0x34]
jne 0x403c10
mov eax, dword [ebp - 0x10]
cmp dword [eax + 0x44], 0
jle 0x403a09
mov ecx, dword [ebp - 0x10]
cmp dword [ecx + 0x44], 0xfeff
jne 0x403a7c
cmp dword [ebp - 0xc], 1
jle 0x403a7c
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 0x403a59
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 0x403a7c
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 0x403a7c
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 0x403c10
mov eax, dword [ebp - 0x10]
cmp dword [eax + 0x44], 0
jle 0x403a8e
mov ecx, dword [ebp - 0x10]
cmp dword [ecx + 0x44], 2
jne 0x403aea
cmp dword [ebp - 0xc], 1
jle 0x403aea
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 0x403aea
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 0x403aea
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 0x403c10
mov edx, dword [ebp - 0x10]
cmp dword [edx + 0x44], 0
jle 0x403aff
mov eax, dword [ebp - 0x10]
cmp dword [eax + 0x44], 0xfde9
jne 0x403b74
cmp dword [ebp - 0xc], 2
jle 0x403b74
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 0x403b74
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 0x403b74
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 0x403b74
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 0x403c10
mov edx, dword [ebp - 0x10]
cmp dword [edx + 0x44], 0
jle 0x403b89
mov eax, dword [ebp - 0x10]
cmp dword [eax + 0x44], 0xfde8
jne 0x403bf3
cmp dword [ebp - 0xc], 2
jle 0x403bf3
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 0x403bf3
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 0x403bf3
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 0x403bf3
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 0x403c10
mov edx, dword [ebp - 0x10]
cmp dword [edx + 0x44], 0
jg 0x403c10
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 0x403da9
mov ecx, dword [ebp - 0x10]
cmp dword [ecx + 0x44], 0
je 0x403da9
mov dword [ebp - 0x18], 0
mov edx, dword [ebp - 0x10]
cmp dword [edx + 0x44], 2
jne 0x403cb0
mov eax, dword [ebp - 0xc]
add eax, 0xa
mov ecx, 0xffffffff
cmovb eax, ecx
push eax
call fcn.0040fb38
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 0x403c77
mov eax, dword [ebp - 0x1c]
add eax, 1
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x1c]
cmp ecx, dword [ebp - 0x20]
jge 0x403cab
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 0x403c6e
jmp 0x403d69
mov edx, dword [ebp - 0x10]
cmp dword [edx + 0x44], 0xfeff
jne 0x403cfd
mov eax, dword [ebp - 0xc]
add eax, 0xa
mov ecx, 0xffffffff
cmovb eax, ecx
push eax
call fcn.0040fb38
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.0040b1c0
add esp, 0xc
jmp 0x403d69
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 [sym.imp.KERNEL32.dll_MultiByteToWideChar]
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.0040fb38
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 [sym.imp.KERNEL32.dll_MultiByteToWideChar]
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 [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x18], 0
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.0040fb1d
add esp, 4
cmp dword [ebp - 0x14], 0
je 0x403dd5
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.0040b1c0
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 0x403e69
mov edx, dword [ebp - 0x14]
cmp edx, dword [ebp + 0x10]
jge 0x403e0a
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x2c], eax
jmp 0x403e10
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 0x403e44
cmp dword [ebp - 0xc], 0
je 0x403e44
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.0040b1c0
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 0x40386c
mov ecx, dword [ebp + 0x14]
cmp dword [ecx], 0
jne 0x403e85
cmp dword [ebp - 0x24], 0
je 0x403e85
mov dword [ebp - 0x30], 0
jmp 0x403e8c
mov dword [ebp - 0x30], 1
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a3f8
mov esp, ebp
pop ebp
ret