Function at 0x401420
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
sub esp, 0x10c
mov dword [0x457cdc], 0
mov dword [0x457b48], 0
mov dword [0x457b4c], 0
cmp byte [ecx], 0
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov dword [0x457b54], esi
mov dword [0x457b50], 0
jne 0x40147a
push 0x104
lea eax, [ebp - 0x10c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
jmp 0x40148f
lea edx, [ebp - 0x10c]
sub edx, ecx
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x401482
lea eax, [ebp - 0x10c]
push 0x445420
push eax
call fcn.00426c43
add esp, 8
mov dword [0x457d08], eax
test eax, eax
je 0x4016bd
test esi, esi
jle 0x4014c5
push 0
push esi
push eax
call fcn.00427211
mov eax, dword [0x457d08]
add esp, 0xc
push eax
push 1
push 0x10
push 0x457b58
call fcn.00426e26
mov eax, dword [0x457b5c]
push dword [0x457d08]
add eax, esi
mov dword [0x457cdc], eax
mov eax, dword [0x457b60]
mov dword [0x457cf8], eax
call fcn.004269c4
push 4
lea eax, [ebp - 8]
mov dword [ebp - 8], 0x584d5044
push eax
push 0x457b58
mov byte [ebp - 4], 0
call fcn.00428d50
add esp, 0x20
test eax, eax
jne 0x4016bd
mov ecx, dword [0x457cf8]
mov ebx, dword [0x457b64]
shl ecx, 5
add ebx, 0x10
add ebx, ecx
push ebx
mov dword [ebp + 8], ebx
call fcn.00428d38
add esp, 4
mov dword [0x457b50], eax
test eax, eax
je 0x4016bd
lea eax, [ebp - 0x10c]
push 0x445420
push eax
call fcn.00426c43
add esp, 8
mov dword [0x457d08], eax
test esi, esi
jle 0x401576
push 0
push esi
push eax
call fcn.00427211
mov eax, dword [0x457d08]
add esp, 0xc
push edi
push eax
push 1
push ebx
push dword [0x457b50]
call fcn.00426e26
push dword [0x457d08]
call fcn.004269c4
mov eax, dword [ebp + 0x14]
add esp, 0x14
sar eax, 0x18
xor ebx, ebx
movzx ecx, al
xor edi, edi
mov eax, 0x24924925
mul ecx
sub ecx, edx
shr ecx, 1
add ecx, edx
shr ecx, 2
cmp dword [ebp + 0x10], 0xffffffff
mov dword [ebp + 0xc], ecx
je 0x401633
lea eax, [ebp - 0x10c]
push 0x445420
push eax
call fcn.00426c43
add esp, 8
mov dword [0x457d08], eax
test esi, esi
jle 0x4015e7
push edi
push esi
push eax
call fcn.00427211
mov eax, dword [0x457d08]
add esp, 0xc
push eax
call fcn.00426a80
add esp, 4
test eax, eax
js 0x40160e
mov esi, dword [ebp + 0xc]
push dword [0x457d08]
add eax, esi
inc edi
add ebx, eax
call fcn.00426a80
add esp, 4
test eax, eax
jns 0x4015f7
push dword [0x457d08]
call fcn.004269c4
movzx eax, bx
add esp, 4
cmp dword [ebp + 0x10], eax
je 0x401630
pop edi
pop esi
mov eax, 0xfffffffe
pop ebx
mov esp, ebp
pop ebp
ret
sub edi, dword [ebp + 8]
mov ebx, dword [ebp + 0x14]
cmp ebx, 0xffffffff
jne 0x40164a
mov dword [0x457cfc], 0xaa
lea eax, [ebx + 0x56]
jmp 0x401683
movzx eax, byte [ebp + 0x16]
movzx ecx, bl
imul ecx, eax
mov eax, 0xaaaaaaab
mul ecx
movzx ecx, bh
shr edx, 1
xor edx, edi
movzx eax, dl
mov dword [0x457cfc], eax
movzx eax, byte [ebp + 0x17]
imul ecx, eax
mov eax, 0xcccccccd
mul ecx
shr edx, 2
xor edx, edi
xor edx, 0xffffffaa
movzx eax, dl
mov dword [0x457d00], eax
xor ecx, ecx
mov dword [0x457b48], 1
nop dword [eax]
nop dword [eax + eax]
mov al, byte [ebp + ecx - 0x10c]
lea ecx, [ecx + 1]
mov byte [ecx + 0x457bd7], al
test al, al
jne 0x4016a0
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret