Function at 0x4de8a8
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffcc
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x34], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x4def6f
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
xor edx, edx
mov dword [eax + 0x2c], edx
mov eax, dword [ebp - 4]
cmp dword [eax + 0x54], 0
je 0x4def4d
mov eax, dword [ebp - 4]
mov byte [eax + 0x50], 2
mov eax, dword [ebp - 4]
call fcn.004ddcb0
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x54]
lea edx, [ebp - 0x2c]
mov eax, dword [ebp - 4]
call fcn.004ddd94
test al, al
je 0x4def54
mov eax, 0x8000
call fcn.00402f14
mov dword [ebp - 0x14], eax
xor edx, edx
push ebp
push 0x4def43
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp - 4]
mov dword [eax + 0x30], 1
mov eax, dword [ebp - 4]
mov byte [eax + 0x328], 0
mov eax, dword [ebp - 4]
cmp dword [eax + 0x4c], 0x13
jbe 0x4dee5b
xor ecx, ecx
xor edx, edx
mov eax, dword [ebp - 0x2c]
call fcn.004d8fe4
push 0
lea eax, [ebp - 0x28]
push eax
push 0x7fff
mov ebx, dword [ebp - 0x14]
push ebx
mov eax, dword [ebp - 0x2c]
push eax
call sub.kernel32.dll_ReadFile_1
mov edi, ebx
cmp word [edi], 0x5a4d
jne 0x4deca9
mov eax, dword [ebp - 4]
mov byte [eax + 0x50], 3
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 4]
call fcn.004de344
test al, al
je 0x4de994
call fcn.0040429c
jmp 0x4def54
push 2
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
call fcn.00404d00
push eax
call sub.kernel32.dll_LoadLibraryExA_1
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x4deb2f
mov eax, 0xc
call fcn.00402f14
mov dword [ebp - 0x18], eax
xor eax, eax
push ebp
push 0x4deb28
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x20], 1
push 6
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.user32.dll_LoadStringA_1
mov eax, dword [ebp - 0x18]
call fcn.0040b184
test eax, eax
jbe 0x4deb09
xor eax, eax
push ebp
push 0x4dea37
push dword fs:[eax]
mov dword fs:[eax], esp
lea edx, [ebp - 0x24]
mov eax, dword [ebp - 0x18]
call fcn.0040626c
mov edx, dword [ebp - 4]
mov dword [edx + 0x30], eax
cmp dword [ebp - 0x24], 0
je 0x4dea2d
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4deb09
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4dea4b
mov eax, dword [ebp - 4]
mov ebx, dword [eax + 0x30]
mov eax, dword [ebp - 4]
cmp ebx, dword [eax + 0x4c]
jae 0x4deb09
mov edx, ebx
xor ecx, ecx
mov eax, dword [ebp - 0x2c]
call fcn.004d8fe4
test al, al
je 0x4deafc
xor eax, eax
push ebp
push 0x4deaf2
push dword fs:[eax]
mov dword fs:[eax], esp
push 0
lea eax, [ebp - 0x28]
push eax
push 4
mov ebx, dword [ebp - 0x14]
push ebx
mov eax, dword [ebp - 0x2c]
push eax
call sub.kernel32.dll_ReadFile_1
mov edi, ebx
cmp dword [ebp - 0x28], 4
jne 0x4deab2
mov eax, dword [edi]
push eax
xor ecx, ecx
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 4]
call fcn.004dde0c
mov edx, dword [ebp - 4]
mov byte [edx + 0x50], al
mov eax, dword [ebp - 4]
cmp byte [eax + 0x50], 3
je 0x4deae8
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x30]
mov edx, dword [ebp - 4]
mov dword [edx + 0x30], eax
mov eax, dword [ebp - 4]
mov byte [eax + 0x328], 0x10
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
call fcn.0040429c
call fcn.0040429c
jmp 0x4def54
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4deafc
inc dword [ebp - 0x20]
cmp dword [ebp - 0x20], 5
jne 0x4de9d8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4deb2f
mov eax, dword [ebp - 0x18]
call fcn.00402f2c
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_FreeLibrary_1
ret
lea edx, [ebp - 0xe]
mov eax, dword [ebp - 0x14]
mov ecx, 6
call fcn.0040319c
movzx eax, word [ebp - 0xa]
dec eax
mov ebx, eax
shl ebx, 9
movzx eax, word [ebp - 0xc]
add ebx, eax
test ebx, ebx
jle 0x4dec3d
lea eax, [ebx + 4]
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0x4c]
jae 0x4dec3d
xor ecx, ecx
mov edx, ebx
mov eax, dword [ebp - 0x2c]
call fcn.004d8fe4
test al, al
je 0x4dec2c
push 0
lea eax, [ebp - 0x28]
push eax
push 4
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 0x2c]
push eax
call sub.kernel32.dll_ReadFile_1
cmp dword [ebp - 0x28], 4
jne 0x4dec3d
cmp word [ebp - 6], 0xea60
sete al
and eax, 0x7f
mov esi, eax
add esi, esi
add esi, ebx
inc esi
mov eax, dword [ebp - 4]
mov dword [eax + 0x30], esi
mov eax, esi
add eax, 4
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0x4c]
jae 0x4dec3d
mov edx, esi
dec edx
xor ecx, ecx
mov eax, dword [ebp - 0x2c]
call fcn.004d8fe4
test al, al
je 0x4dec22
push 0
lea eax, [ebp - 0x28]
push eax
push 4
mov ebx, dword [ebp - 0x14]
push ebx
mov eax, dword [ebp - 0x2c]
push eax
call sub.kernel32.dll_ReadFile_1
mov edi, ebx
mov esi, dword [edi]
cmp esi, 0x4034b50
je 0x4dec3d
cmp dword [ebp - 0x28], 4
jne 0x4dec3d
push esi
xor ecx, ecx
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 4]
call fcn.004dde0c
mov ebx, eax
mov eax, dword [ebp - 4]
mov byte [eax + 0x50], bl
mov eax, ebx
call fcn.004de890
test al, al
je 0x4dec3d
call fcn.0040429c
jmp 0x4def54
call fcn.0040429c
jmp 0x4def54
mov eax, dword [ebp - 4]
mov byte [eax + 0x50], 2
call fcn.0040429c
jmp 0x4def54
mov eax, dword [ebp - 4]
xor edx, edx
mov dword [eax + 0xc0], edx
mov eax, dword [ebp - 4]
mov al, byte [eax + 0x50]
call fcn.004de890
test al, al
jne 0x4dec75
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 4]
call fcn.004dd9d4
mov ebx, eax
mov eax, dword [ebp - 4]
mov dword [eax + 0x30], ebx
test ebx, ebx
jbe 0x4dec75
mov eax, dword [ebp - 4]
mov byte [eax + 0x50], 0x1d
mov eax, dword [ebp - 4]
mov al, byte [eax + 0x50]
call fcn.004de890
test al, al
jne 0x4dee5b
push 0x4268
mov eax, dword [ebp - 4]
lea ecx, [eax + 0x50]
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 4]
call fcn.004de0b0
mov edx, dword [ebp - 4]
mov dword [edx + 0x30], eax
jmp 0x4dee5b
mov esi, dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
cmp byte [eax], 0
jne 0x4decc8
mov eax, dword [ebp - 0x28]
dec eax
test eax, eax
jl 0x4decc6
inc eax
cmp byte [esi], 0
jne 0x4decc6
inc esi
dec eax
jne 0x4decbd
mov edi, esi
mov eax, dword [edi]
push eax
mov cl, 1
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 4]
call fcn.004dde0c
mov ebx, eax
mov eax, dword [ebp - 4]
mov byte [eax + 0x50], bl
sub bl, 0xf
je 0x4decf1
add bl, 0xf3
sub bl, 2
jb 0x4decf1
jne 0x4ded4b
jmp 0x4ded6b
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 4]
call fcn.004dd9d4
mov edx, dword [ebp - 4]
mov dword [edx + 0x30], eax
mov eax, dword [ebp - 4]
test byte [eax + 0x328], 0x10
jne 0x4ded2a
mov eax, dword [ebp - 4]
cmp dword [eax + 0x30], 0
jne 0x4ded2a
sub esi, dword [ebp - 0x14]
mov eax, dword [ebp - 4]
add dword [eax + 0x30], esi
mov eax, dword [ebp - 4]
or byte [eax + 0x328], 0x10
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x48]
cmp byte [eax + 0x7c], 2
jne 0x4ded6b
mov eax, dword [ebp - 4]
test byte [eax + 0x328], 1
jne 0x4ded6b
mov eax, dword [ebp - 4]
mov byte [eax + 0x50], 0x1e
jmp 0x4ded6b
mov edx, 0x4def80
mov eax, dword [ebp - 0x14]
add eax, 7
mov ecx, 7
call fcn.0040b2fc
test eax, eax
jne 0x4ded6b
mov eax, dword [ebp - 4]
mov byte [eax + 0x50], 4
mov eax, dword [ebp - 4]
mov al, byte [eax + 0x50]
call fcn.004de890
test al, al
jne 0x4dee5b
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x48]
cmp byte [eax + 0x7c], 2
jne 0x4dedc5
cmp dword [eax + 0x88], 0
jle 0x4dedc5
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 4]
call fcn.004dd9d4
mov edx, dword [ebp - 4]
mov dword [edx + 0x30], eax
mov eax, dword [ebp - 4]
mov al, byte [eax + 0x328]
test al, al
je 0x4dedb9
cmp al, 0x10
jae 0x4dee5b
mov eax, dword [ebp - 4]
mov byte [eax + 0x50], 0x1e
jmp 0x4dee5b
mov edx, 0x4def80
mov eax, dword [ebp - 0x14]
add eax, 7
mov ecx, 7
call fcn.0040b2fc
test eax, eax
jne 0x4dede7
mov eax, dword [ebp - 4]
mov byte [eax + 0x50], 4
jmp 0x4dee5b
push ebp
mov eax, dword [ebp - 0x2c]
call fcn.004de750
pop ecx
test al, al
jne 0x4dee5b
push ebp
mov eax, dword [ebp - 0x2c]
call fcn.004de5e4
pop ecx
test al, al
jne 0x4dee5b
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 4]
call fcn.004dd9d4
mov edx, dword [ebp - 4]
mov dword [edx + 0x30], eax
mov eax, dword [ebp - 4]
mov al, byte [eax + 0x328]
test al, 0x10
jbe 0x4dee30
test al, 1
jbe 0x4dee30
mov eax, dword [ebp - 4]
mov byte [eax + 0x50], 0x1c
jmp 0x4dee5b
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x48]
cmp byte [eax + 0x7c], 2
jne 0x4dee5b
mov eax, dword [ebp - 4]
test byte [eax + 0x328], 0x10
jne 0x4dee5b
mov eax, dword [ebp - 4]
test byte [eax + 0x328], 1
jbe 0x4dee5b
mov eax, dword [ebp - 4]
mov byte [eax + 0x50], 0x1e
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4def54
mov eax, dword [ebp - 0x14]
call fcn.00402f2c
mov eax, dword [ebp - 4]
mov al, byte [eax + 0x50]
call fcn.004de890
test al, al
je 0x4def2f
xor eax, eax
push ebp
push 0x4def19
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
push ebp
push 0x4def08
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
cmp byte [eax + 0x50], 0x1c
jne 0x4deedb
lea edx, [ebp - 0x34]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
call fcn.0040af0c
mov eax, dword [ebp - 0x34]
lea edx, [ebp - 0x30]
call fcn.00409fe4
mov eax, dword [ebp - 0x30]
mov edx, dword [0x57850c]
mov edx, dword [edx + 0x44]
call fcn.00404c4c
jne 0x4deedb
mov eax, dword [ebp - 4]
mov byte [eax + 0x50], 0xf
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4def0f
xor edx, edx
mov eax, dword [ebp - 0x2c]
call fcn.004d9038
mov ebx, eax
mov eax, dword [ebp - 4]
mov dword [eax + 0x44], ebx
inc ebx
jne 0x4def07
mov eax, dword [ebp - 4]
mov dword [eax + 0x44], 0x7225
ret
mov eax, dword [ebp - 4]
mov dword [eax + 0x44], 0x7225
mov eax, dword [ebp - 0x2c]
push eax
call sub.kernel32.dll_CloseHandle_1
ret
mov eax, dword [ebp - 4]
mov byte [eax + 0x50], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4def76
lea eax, [ebp - 0x34]
mov edx, 2
call fcn.004048b8
ret