Function at 0x403500
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14
push ebx
push ebp
push esi
mov esi, dword [sym.imp.MSVCRT.dll_calloc]
push edi
push 1
push 0x3c01
call esi
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x40355a
cmp dword [esp + 0x34], 0xf
jle 0x403a5d
mov edi, 0x409364
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 + 0x30]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
xor eax, eax
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x10
push 1
push 0x3c01
call esi
add esp, 8
mov dword [esp + 0x10], eax
test eax, eax
jne 0x4035af
cmp dword [esp + 0x34], 0xf
jle 0x403599
mov edi, 0x409364
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 + 0x30]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push ebx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x10
mov esi, dword [esp + 0x2c]
mov ebp, dword [esp + 0x28]
push 0
push esi
push ebp
call dword [sym.imp.MSVCRT.dll__lseek]
add esp, 0xc
mov dword [esp + 0x18], esi
push ebp
call dword [sym.imp.MSVCRT.dll__filelength]
mov edi, str.AUTEKEND
or ecx, 0xffffffff
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x2c], ecx
call fcn.00402b50
mov eax, dword [0x40a428]
mov ecx, dword fs:[0x2c]
mov edi, dword [ecx + eax*4]
mov dword [esp + 0x1c], edi
mov eax, dword [edi + 0xf8c0]
test eax, eax
je 0x40363f
push 2
push 0
lea edi, [edi + 0xf8c8]
push 0
push 0
push edi
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
je 0x40363f
push 0
push 0
push 0
push edi
call dword [sym.imp.USER32.dll_GetMessageA]
push edi
call dword [sym.imp.USER32.dll_TranslateMessage]
push edi
call dword [sym.imp.USER32.dll_DispatchMessageA]
push 0x2800
push ebx
push ebp
call dword [sym.imp.MSVCRT.dll__read]
mov edi, eax
add esp, 0xc
test edi, edi
mov dword [esp + 0x20], edi
jl 0x403726
je 0x4037d3
mov edx, dword [esp + 0x34]
mov esi, dword [esp + 0x30]
mov eax, dword [esp + 0x10]
push edx
push esi
push edi
push eax
push ebx
call fcn.00402b70
mov ebp, eax
mov eax, dword [esp + 0x40]
mov ecx, 0x2800
add esp, 0x14
sub ecx, eax
cmp edi, ecx
jge 0x4036f0
mov edx, 0x3bfc
sub edx, eax
cmp ebp, edx
jge 0x4036f0
mov eax, dword [esp + 0x34]
push eax
push esi
mov esi, dword [esp + 0x18]
push 0
lea ecx, [ebp + esi]
push ecx
push ebx
call fcn.00402b70
add ebp, eax
mov edi, str.AUTEKEND
or ecx, 0xffffffff
xor eax, eax
add esp, 0x14
lea edx, [ebp + esi]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x14], 1
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x2c]
and ecx, 3
add ebp, eax
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x20]
mov ecx, dword [esp + 0x10]
push ebp
push ecx
call fcn.004033c0
cmp eax, ebp
jne 0x403830
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x4038de
mov eax, dword [esp + 0x18]
mov ebp, dword [esp + 0x28]
add eax, edi
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x18], eax
jmp 0x403601
mov edi, str.DATAERROR
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, ebx
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, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push ebx
call fcn.004033c0
mov edi, 0x409344
or ecx, 0xffffffff
xor eax, eax
push ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 5
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.004032a0
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp dword [esp + 0x34], eax
jle 0x4037b1
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 + 0x30]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.MSVCRT.dll_free]
push ebx
call esi
mov eax, dword [esp + 0x14]
add esp, 4
push eax
call esi
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x10
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x30]
mov ebp, dword [esp + 0x10]
push ecx
push edx
push 0
push ebp
push ebx
call fcn.00402b70
mov edx, eax
mov edi, str.AUTEKEND
or ecx, 0xffffffff
xor eax, eax
add esp, 0x14
lea esi, [edx + ebp]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x28], esi
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x28]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x2c]
add edx, ecx
push edx
push ebp
call fcn.004033c0
mov esi, dword [esp + 0x30]
jmp 0x4038e2
mov edi, str.DATAERROR
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, ebx
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, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push ebx
call fcn.004033c0
mov edi, 0x409330
or ecx, 0xffffffff
xor eax, eax
push ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.004032a0
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp dword [esp + 0x34], eax
jle 0x4038bb
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 + 0x30]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.MSVCRT.dll_free]
push ebx
call esi
mov eax, dword [esp + 0x14]
add esp, 4
push eax
call esi
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x10
mov ebp, dword [esp + 0x10]
mov edi, dword [esp + 0x1c]
mov eax, dword [edi + 0xf8c0]
test eax, eax
je 0x403924
push 2
push 0
lea edi, [edi + 0xf8c8]
push 0
push 0
push edi
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
je 0x403924
push 0
push 0
push 0
push edi
call dword [sym.imp.USER32.dll_GetMessageA]
push edi
call dword [sym.imp.USER32.dll_TranslateMessage]
push edi
call dword [sym.imp.USER32.dll_DispatchMessageA]
push 0x2800
push ebx
call fcn.00402ca0
test eax, eax
jl 0x403984
je 0x4038e2
cmp byte [ebx], 0
jne 0x4038e2
cmp byte [ebx + 1], 1
jne 0x4038e2
mov al, byte [ebx + 4]
cmp al, 1
jne 0x4038e2
cmp byte [ebx + 5], 4
jne 0x40396d
xor edx, edx
xor ecx, ecx
mov dl, byte [ebx + 6]
mov cl, byte [ebx + 7]
shl edx, 8
add ecx, edx
cmp ecx, 0x7530
je 0x4039fb
jmp 0x4038e2
cmp al, 1
jne 0x4038e2
cmp byte [ebx + 5], 5
je 0x403a1c
jmp 0x4038e2
mov edi, 0x409320
or ecx, 0xffffffff
xor eax, eax
push ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.004032a0
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp dword [esp + 0x34], eax
jle 0x4039dc
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 + 0x30]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.MSVCRT.dll_free]
push ebx
call esi
add esp, 4
push ebp
call esi
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x10
mov esi, dword [sym.imp.MSVCRT.dll_free]
push ebx
call esi
add esp, 4
push ebp
call esi
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x10
xor eax, eax
xor ecx, ecx
mov al, byte [ebx + 9]
mov cl, byte [ebx + 8]
mov edi, eax
mov eax, dword [esp + 0x34]
shl ecx, 8
add edi, ecx
cmp eax, edi
jle 0x403a4b
xor eax, eax
test edi, edi
jle 0x403a47
mov dl, byte [eax + ebx + 0xa]
mov byte [eax + esi], dl
inc eax
cmp eax, edi
jl 0x403a3b
mov byte [eax + esi], 0
mov esi, dword [sym.imp.MSVCRT.dll_free]
push ebx
call esi
add esp, 4
push ebp
call esi
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x14
ret 0x10