Function at 0x4095a0
Capabilities:
Read file on windows
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x8ac
mov eax, dword [esp + 0x8b4]
push ebx
push ebp
mov ebp, dword [sym.imp.MSVCRT.dll_malloc]
push esi
mov esi, dword [esp + 0x8bc]
push edi
xor edi, edi
cmp eax, 1
mov dword [esp + 0x10], edi
mov dword [esp + 0x24], esi
mov dword [esp + 0x38], edi
jne 0x4096c3
push 0x8000
push esi
call dword [sym.imp.MSVCRT.dll__open]
mov esi, eax
add esp, 8
cmp esi, edi
jl 0x409eda
mov ebx, dword [sym.imp.MSVCRT.dll__lseek]
push 2
push edi
push esi
call ebx
add esp, 0xc
test eax, eax
push esi
jge 0x409619
call dword [sym.imp.MSVCRT.dll__close]
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8ac
ret
call dword [sym.imp.MSVCRT.dll__tell]
mov edi, eax
add esp, 4
cmp edi, 1
jge 0x409640
push esi
call dword [sym.imp.MSVCRT.dll__close]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8ac
ret
push 0
push 0
push esi
call ebx
add esp, 0xc
test eax, eax
jge 0x409666
push esi
call dword [sym.imp.MSVCRT.dll__close]
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8ac
ret
lea eax, [edi + 2]
push eax
call ebp
mov ebx, eax
add esp, 4
test ebx, ebx
mov dword [esp + 0x38], ebx
je 0x409eda
push edi
push ebx
push esi
mov dword [esp + 0x30], ebx
call dword [sym.imp.MSVCRT.dll__read]
add esp, 0xc
cmp edi, eax
push esi
je 0x4096b0
call dword [sym.imp.MSVCRT.dll__close]
push ebx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8ac
ret
call dword [sym.imp.MSVCRT.dll__close]
add esp, 4
mov byte [edi + ebx], 0
mov dword [esp + 0x48], edi
jmp 0x409732
cmp eax, 2
mov edi, esi
jne 0x409724
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 1
mov dword [esp + 0x48], ecx
jge 0x4096e8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8ac
ret
add ecx, 2
push ecx
call ebp
mov edx, eax
add esp, 4
test edx, edx
mov dword [esp + 0x38], edx
je 0x409eda
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
mov dword [esp + 0x24], edx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x409732
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x48], ecx
mov edi, dword [esp + 0x8c8]
or ecx, 0xffffffff
xor eax, eax
mov esi, dword [esp + 0x24]
repne scasb al, byte es:[edi]
mov edi, dword [esp + 0x8d4]
xor edx, edx
not ecx
dec ecx
cmp edi, edx
mov dword [esp + 0x68], ecx
mov dword [esp + 0x60], edx
je 0x409774
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 1
mov dword [esp + 0x60], ecx
jge 0x409774
mov dword [esp + 0x8d4], edx
mov ebx, dword [esp + 0x8d0]
xor ecx, ecx
cmp ebx, ecx
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x70], ecx
mov dword [esp + 0x3c], ecx
je 0x409818
push str.LEVELNO
push ebx
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
test eax, eax
jne 0x4097ae
mov dword [esp + 0x70], 1
jmp 0x4097fc
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 4
jle 0x4097fc
mov al, byte [ebx]
cmp al, 0x52
je 0x4097c9
cmp al, 0x72
jne 0x4097fc
mov al, byte [ebx + 1]
cmp al, 0x4f
je 0x4097d4
cmp al, 0x6f
jne 0x4097fc
mov al, byte [ebx + 2]
cmp al, 0x4f
je 0x4097df
cmp al, 0x6f
jne 0x4097fc
mov al, byte [ebx + 3]
cmp al, 0x54
je 0x4097ea
cmp al, 0x74
jne 0x4097fc
add ebx, 4
mov dword [esp + 0x3c], 1
mov dword [esp + 0x8d0], ebx
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 1
mov dword [esp + 0x7c], ecx
jge 0x409818
mov dword [esp + 0x8d0], eax
mov edi, dword [esp + 0x8cc]
xor edx, edx
cmp edi, edx
mov dword [esp + 0x80], edx
je 0x409846
cmp ecx, edx
jle 0x409846
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 1
mov dword [esp + 0x80], ecx
jge 0x40984d
mov dword [esp + 0x8cc], edx
mov edi, dword [esp + 0x8d8]
mov dword [esp + 0x50], edx
cmp edi, edx
je 0x409876
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 1
mov dword [esp + 0x50], ecx
jge 0x409876
mov dword [esp + 0x8d8], edx
mov eax, dword [esp + 0x8dc]
mov dword [esp + 0x34], 1
cmp eax, edx
je 0x4098b9
mov eax, dword [esp + 0x24]
xor edi, edi
cmp eax, edx
mov dword [esp + 0x34], edi
je 0x4098b9
mov ebx, dword [esp + 0x8c8]
push ebx
push esi
inc edi
call fcn.0040bc00
mov esi, eax
add esp, 8
test esi, esi
je 0x4098b5
add esi, dword [esp + 0x68]
jne 0x40989e
mov dword [esp + 0x34], edi
mov esi, dword [esp + 0x24]
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0xbc]
rep stosd dword es:[edi], eax
mov ecx, 0x100
lea edi, [esp + 0x4bc]
or edx, 0xffffffff
push 0x10000
rep stosd dword es:[edi], eax
mov dword [esp + 0x60], edx
mov dword [esp + 0x4c0], edx
mov dword [esp + 0x34], eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0xc0], eax
mov dword [esp + 0x5c], eax
mov byte [esp + 0x1e], al
mov dword [esp + 0x44], eax
mov byte [esp + 0x1a], al
mov byte [esp + 0x1f], al
mov dword [esp + 0x48], eax
mov byte [esp + 0x1b], al
mov byte [esp + 0x1c], al
mov dword [esp + 0x50], eax
mov byte [esp + 0x1d], al
mov dword [esp + 0x2c], esi
mov ebx, esi
call ebp
mov edi, eax
push 0x800
mov dword [esp + 0x34], edi
call ebp
push 0x800
mov dword [esp + 0x28], eax
call ebp
add esp, 0xc
mov dword [esp + 0x20], eax
test edi, edi
je 0x409e9c
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x409e9c
mov eax, dword [esp + 0x20]
test eax, eax
je 0x409e9c
mov ebp, esi
test ebp, ebp
je 0x409dff
mov dword [esp + 0x54], 1
jmp 0x409984
mov ebp, dword [esp + 0x24]
mov ecx, 0xe
xor eax, eax
lea edi, [esp + 0x84]
xor edx, edx
rep stosd dword es:[edi], eax
cmp dword [esp + 0x10], edx
jne 0x4099a8
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], edx
mov dword [esp + 0x4c], edx
cmp ebx, edx
mov dword [esp + 0x64], edx
mov dword [esp + 0x6c], edx
mov dword [esp + 0x74], edx
je 0x409a33
mov edi, dword [esp + 0x8c8]
push edi
push ebx
call fcn.0040bc00
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x409a1d
mov eax, dword [esp + 0x10]
mov ecx, esi
mov edx, ebx
sub ecx, ebp
sub edx, ebp
mov dword [esp + 0x8c], ecx
test eax, eax
mov dword [esp + 0x90], edx
jne 0x4099fa
mov al, byte [ebx]
mov dword [esp + 0x40], ebx
mov byte [esp + 0x1a], al
mov byte [ebx], 0
mov eax, dword [esp + 0x68]
push edi
add ebx, eax
push ebx
call fcn.0040bc00
add esp, 8
mov dword [esp + 0x64], eax
test eax, eax
je 0x409a33
mov cl, byte [eax]
mov byte [eax], 0
mov byte [esp + 0x16], cl
jmp 0x409a33
mov eax, dword [esp + 0x48]
mov edx, esi
sub edx, ebp
mov dword [esp + 0x90], eax
mov dword [esp + 0x8c], edx
mov eax, dword [esp + 0x60]
test eax, eax
jle 0x409a8b
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x409a65
mov ecx, dword [esp + 0x8d4]
push ecx
push esi
call fcn.0040bc00
add esp, 8
mov dword [esp + 0x44], eax
test eax, eax
je 0x409a65
mov dl, byte [eax]
mov byte [eax], 0
mov byte [esp + 0x1b], dl
test ebx, ebx
je 0x409a8b
mov eax, dword [esp + 0x8d4]
push eax
push ebx
call fcn.0040bc00
add esp, 8
mov dword [esp + 0x6c], eax
test eax, eax
je 0x409a8b
mov cl, byte [eax]
mov byte [eax], 0
mov byte [esp + 0x17], cl
mov ebp, dword [esp + 0x80]
mov edi, esi
test ebp, ebp
jle 0x409aed
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x409ac7
mov edx, dword [esp + 0x8cc]
xor edi, edi
push edx
push esi
call fcn.0040bc00
add esp, 8
mov dword [esp + 0x4c], eax
test eax, eax
je 0x409ac7
mov cl, byte [eax]
mov byte [eax], 0
mov byte [esp + 0x18], cl
lea edi, [eax + ebp]
test ebx, ebx
je 0x409aed
mov edx, dword [esp + 0x8cc]
push edx
push ebx
call fcn.0040bc00
add esp, 8
mov dword [esp + 0x74], eax
test eax, eax
je 0x409aed
mov cl, byte [eax]
mov byte [eax], 0
mov byte [esp + 0x19], cl
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x409b95
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x1c]
test edi, edi
mov byte [edx], 0
mov byte [eax], 0
je 0x409b37
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [esp + 0x2c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x8d8]
mov esi, dword [esp + 0x28]
jmp 0x409b3e
mov edi, dword [esp + 0x8d8]
test esi, esi
je 0x409b70
mov edi, dword [esp + 0x28]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x1c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x8d8]
mov esi, dword [esp + 0x28]
mov eax, dword [esp + 0x50]
test eax, eax
jle 0x409b9c
mov ecx, dword [esp + 0x2c]
push edi
push edi
push ecx
call fcn.00408a30
mov edx, dword [esp + 0x28]
push edi
push edi
push edx
call fcn.00408a30
add esp, 0x18
jmp 0x409b9c
mov edi, dword [esp + 0x8d8]
mov eax, dword [esp + 0x20]
test ebx, ebx
mov byte [eax], 0
je 0x409bd3
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [esp + 0x20]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x8d8]
mov esi, dword [esp + 0x28]
mov eax, dword [esp + 0x50]
test eax, eax
jle 0x409bea
mov eax, dword [esp + 0x20]
push edi
push edi
push eax
call fcn.00408a30
add esp, 0xc
mov edi, dword [esp + 0x1c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 1
jb 0x409e4b
test ebx, ebx
je 0x409c2f
mov edi, dword [esp + 0x20]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 1
jae 0x409c2f
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x409db6
mov dword [esp + 0x10], 2
jmp 0x409dba
mov ecx, dword [esp + 0x70]
mov edx, dword [esp + 0x7c]
mov eax, dword [esp + 0x8d0]
push ecx
mov ecx, dword [esp + 0x24]
push edx
mov edx, dword [esp + 0x24]
push eax
push ecx
push edx
call fcn.00409ef0
mov esi, eax
mov eax, dword [esp + 0x50]
add esp, 0x14
test eax, eax
je 0x409c71
cmp dword [esp + 0x58], 1
jge 0x409c71
mov esi, 1
mov dword [esp + 0x3c], 0
mov edi, dword [esp + 0x78]
lea ebp, [esi + edi]
test ebp, ebp
mov dword [esp + 0x30], ebp
jge 0x409c86
xor ebp, ebp
mov dword [esp + 0x30], ebp
cmp dword [esp + 0x10], 1
jne 0x409c9a
test esi, esi
jg 0x409db6
jmp 0x409e4b
mov eax, dword [esp + 0x8e4]
mov edx, dword [esp + 0x34]
mov ecx, dword [esp + 0x58]
mov dword [esp + 0x84], eax
lea eax, [esp + edi*4 + 0x4bc]
mov dword [esp + 0x94], edx
mov edx, dword [esp + 0x8cc]
mov dword [esp + 0x10], eax
mov eax, dword [eax]
mov dword [esp + 0x88], ecx
mov ecx, dword [esp + 0x1c]
inc eax
mov dword [esp + 0x9c], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0xa8], edx
mov edx, dword [esp + 0x8d8]
test edi, edi
mov dword [esp + 0x98], edi
mov dword [esp + 0xa0], eax
mov dword [esp + 0xa4], ecx
mov dword [esp + 0xac], edx
jle 0x409d18
or dword [esp + 0xb0], 2
test esi, esi
jle 0x409d24
or dword [esp + 0xb0], 1
mov edx, dword [esp + edi*4 + 0xbc]
mov dword [esp + 0xb4], edx
mov dl, byte [eax]
test dl, dl
jne 0x409d3d
cmp byte [ecx], 0
je 0x409d4f
lea eax, [esp + 0x84]
push eax
call dword [esp + 0x8e4]
add esp, 4
cmp ebp, 0x100
jl 0x409d6b
mov ebp, 0xff
mov dword [esp + 0xb8], 1
mov dword [esp + 0x30], ebp
lea edx, [edi + 1]
cmp edx, ebp
jg 0x409d9a
mov eax, dword [esp + 0xb4]
mov ecx, ebp
sub ecx, edx
lea edi, [esp + edx*4 + 0xbc]
inc ecx
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx]
inc eax
mov dword [esp + edx*4 + 0x4bc], eax
inc edx
cmp edx, ebp
jle 0x409d87
mov eax, dword [esp + 0xb8]
cmp eax, 1
jne 0x409e42
test esi, esi
jle 0x409e4b
mov dword [esp + 0x10], eax
mov esi, dword [esp + 0x28]
mov edx, dword [esp + 0x54]
mov eax, dword [esp + 0x64]
inc edx
test eax, eax
mov dword [esp + 0x54], edx
je 0x409dd1
mov dl, byte [esp + 0x16]
mov byte [eax], dl
mov eax, dword [esp + 0x6c]
test eax, eax
je 0x409ddf
mov cl, byte [esp + 0x17]
mov byte [eax], cl
mov eax, dword [esp + 0x74]
test eax, eax
je 0x409ded
mov dl, byte [esp + 0x19]
mov byte [eax], dl
cmp dword [esp + 0xb8], 2
je 0x409e07
test esi, esi
jne 0x409980
mov dword [esp + 0x5c], 1
mov eax, dword [esp + 0x38]
mov esi, dword [sym.imp.MSVCRT.dll_free]
test eax, eax
je 0x409e1b
push eax
call esi
add esp, 4
mov eax, dword [esp + 0x2c]
push eax
call esi
mov ecx, dword [esp + 0x20]
push ecx
call esi
mov edx, dword [esp + 0x28]
push edx
call esi
mov eax, dword [esp + 0x68]
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8ac
ret
cmp eax, 2
jne 0x409e4b
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x54]
mov edx, dword [esp + 0x30]
mov esi, ebx
test eax, eax
mov dword [esp + 0x10], 0
mov dword [esp + 0x28], esi
mov dword [esp + 0x58], ecx
mov dword [esp + 0x78], edx
je 0x409e77
mov cl, byte [esp + 0x1a]
mov byte [eax], cl
mov eax, dword [esp + 0x44]
test eax, eax
je 0x409e85
mov dl, byte [esp + 0x1b]
mov byte [eax], dl
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x409dba
mov cl, byte [esp + 0x18]
mov byte [eax], cl
jmp 0x409dba
mov eax, dword [esp + 0x38]
mov esi, dword [sym.imp.MSVCRT.dll_free]
test eax, eax
je 0x409eb0
push eax
call esi
add esp, 4
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x409ebe
push eax
call esi
add esp, 4
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x409ecc
push eax
call esi
add esp, 4
mov eax, dword [esp + 0x20]
test eax, eax
je 0x409eda
push eax
call esi
add esp, 4
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x8ac
ret