Function at 0x4d2994
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 0x4d305b
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 0x4d3039
mov eax, dword [ebp - 4]
mov byte [eax + 0x50], 2
mov eax, dword [ebp - 4]
call fcn.004d1d9c
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x54]
lea edx, [ebp - 0x2c]
mov eax, dword [ebp - 4]
call fcn.004d1e80
test al, al
je 0x4d3040
mov eax, 0x8000
call fcn.00402f14
mov dword [ebp - 0x14], eax
xor edx, edx
push ebp
push 0x4d302f
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 0x4d2f47
xor ecx, ecx
xor edx, edx
mov eax, dword [ebp - 0x2c]
call fcn.004cd0d0
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 0x4d2d95
mov eax, dword [ebp - 4]
mov byte [eax + 0x50], 3
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 4]
call fcn.004d2430
test al, al
je 0x4d2a80
call fcn.0040429c
jmp 0x4d3040
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 0x4d2c1b
mov eax, 0xc
call fcn.00402f14
mov dword [ebp - 0x18], eax
xor eax, eax
push ebp
push 0x4d2c14
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 0x4d2bf5
xor eax, eax
push ebp
push 0x4d2b23
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 0x4d2b19
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4d2bf5
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4d2b37
mov eax, dword [ebp - 4]
mov ebx, dword [eax + 0x30]
mov eax, dword [ebp - 4]
cmp ebx, dword [eax + 0x4c]
jae 0x4d2bf5
mov edx, ebx
xor ecx, ecx
mov eax, dword [ebp - 0x2c]
call fcn.004cd0d0
test al, al
je 0x4d2be8
xor eax, eax
push ebp
push 0x4d2bde
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 0x4d2b9e
mov eax, dword [edi]
push eax
xor ecx, ecx
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 4]
call fcn.004d1ef8
mov edx, dword [ebp - 4]
mov byte [edx + 0x50], al
mov eax, dword [ebp - 4]
cmp byte [eax + 0x50], 3
je 0x4d2bd4
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 0x4d3040
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4d2be8
inc dword [ebp - 0x20]
cmp dword [ebp - 0x20], 5
jne 0x4d2ac4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4d2c1b
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 0x4d2d29
lea eax, [ebx + 4]
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0x4c]
jae 0x4d2d29
xor ecx, ecx
mov edx, ebx
mov eax, dword [ebp - 0x2c]
call fcn.004cd0d0
test al, al
je 0x4d2d18
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 0x4d2d29
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 0x4d2d29
mov edx, esi
dec edx
xor ecx, ecx
mov eax, dword [ebp - 0x2c]
call fcn.004cd0d0
test al, al
je 0x4d2d0e
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 0x4d2d29
cmp dword [ebp - 0x28], 4
jne 0x4d2d29
push esi
xor ecx, ecx
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 4]
call fcn.004d1ef8
mov ebx, eax
mov eax, dword [ebp - 4]
mov byte [eax + 0x50], bl
mov eax, ebx
call fcn.004d297c
test al, al
je 0x4d2d29
call fcn.0040429c
jmp 0x4d3040
call fcn.0040429c
jmp 0x4d3040
mov eax, dword [ebp - 4]
mov byte [eax + 0x50], 2
call fcn.0040429c
jmp 0x4d3040
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.004d297c
test al, al
jne 0x4d2d61
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 4]
call fcn.004d1ac0
mov ebx, eax
mov eax, dword [ebp - 4]
mov dword [eax + 0x30], ebx
test ebx, ebx
jbe 0x4d2d61
mov eax, dword [ebp - 4]
mov byte [eax + 0x50], 0x1d
mov eax, dword [ebp - 4]
mov al, byte [eax + 0x50]
call fcn.004d297c
test al, al
jne 0x4d2f47
push 0x4268
mov eax, dword [ebp - 4]
lea ecx, [eax + 0x50]
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 4]
call fcn.004d219c
mov edx, dword [ebp - 4]
mov dword [edx + 0x30], eax
jmp 0x4d2f47
mov esi, dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
cmp byte [eax], 0
jne 0x4d2db4
mov eax, dword [ebp - 0x28]
dec eax
test eax, eax
jl 0x4d2db2
inc eax
cmp byte [esi], 0
jne 0x4d2db2
inc esi
dec eax
jne 0x4d2da9
mov edi, esi
mov eax, dword [edi]
push eax
mov cl, 1
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 4]
call fcn.004d1ef8
mov ebx, eax
mov eax, dword [ebp - 4]
mov byte [eax + 0x50], bl
sub bl, 0xf
je 0x4d2ddd
add bl, 0xf3
sub bl, 2
jb 0x4d2ddd
jne 0x4d2e37
jmp 0x4d2e57
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 4]
call fcn.004d1ac0
mov edx, dword [ebp - 4]
mov dword [edx + 0x30], eax
mov eax, dword [ebp - 4]
test byte [eax + 0x328], 0x10
jne 0x4d2e16
mov eax, dword [ebp - 4]
cmp dword [eax + 0x30], 0
jne 0x4d2e16
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 0x4d2e57
mov eax, dword [ebp - 4]
test byte [eax + 0x328], 1
jne 0x4d2e57
mov eax, dword [ebp - 4]
mov byte [eax + 0x50], 0x1e
jmp 0x4d2e57
mov edx, 0x4d306c
mov eax, dword [ebp - 0x14]
add eax, 7
mov ecx, 7
call fcn.0040b2fc
test eax, eax
jne 0x4d2e57
mov eax, dword [ebp - 4]
mov byte [eax + 0x50], 4
mov eax, dword [ebp - 4]
mov al, byte [eax + 0x50]
call fcn.004d297c
test al, al
jne 0x4d2f47
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x48]
cmp byte [eax + 0x7c], 2
jne 0x4d2eb1
cmp dword [eax + 0x88], 0
jle 0x4d2eb1
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 4]
call fcn.004d1ac0
mov edx, dword [ebp - 4]
mov dword [edx + 0x30], eax
mov eax, dword [ebp - 4]
mov al, byte [eax + 0x328]
test al, al
je 0x4d2ea5
cmp al, 0x10
jae 0x4d2f47
mov eax, dword [ebp - 4]
mov byte [eax + 0x50], 0x1e
jmp 0x4d2f47
mov edx, 0x4d306c
mov eax, dword [ebp - 0x14]
add eax, 7
mov ecx, 7
call fcn.0040b2fc
test eax, eax
jne 0x4d2ed3
mov eax, dword [ebp - 4]
mov byte [eax + 0x50], 4
jmp 0x4d2f47
push ebp
mov eax, dword [ebp - 0x2c]
call fcn.004d283c
pop ecx
test al, al
jne 0x4d2f47
push ebp
mov eax, dword [ebp - 0x2c]
call fcn.004d26d0
pop ecx
test al, al
jne 0x4d2f47
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 4]
call fcn.004d1ac0
mov edx, dword [ebp - 4]
mov dword [edx + 0x30], eax
mov eax, dword [ebp - 4]
mov al, byte [eax + 0x328]
test al, 0x10
jbe 0x4d2f1c
test al, 1
jbe 0x4d2f1c
mov eax, dword [ebp - 4]
mov byte [eax + 0x50], 0x1c
jmp 0x4d2f47
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x48]
cmp byte [eax + 0x7c], 2
jne 0x4d2f47
mov eax, dword [ebp - 4]
test byte [eax + 0x328], 0x10
jne 0x4d2f47
mov eax, dword [ebp - 4]
test byte [eax + 0x328], 1
jbe 0x4d2f47
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 0x4d3040
mov eax, dword [ebp - 0x14]
call fcn.00402f2c
mov eax, dword [ebp - 4]
mov al, byte [eax + 0x50]
call fcn.004d297c
test al, al
je 0x4d301b
xor eax, eax
push ebp
push 0x4d3005
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
push ebp
push 0x4d2ff4
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
cmp byte [eax + 0x50], 0x1c
jne 0x4d2fc7
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 [0x567478]
mov edx, dword [edx + 0x44]
call fcn.00404c4c
jne 0x4d2fc7
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 0x4d2ffb
xor edx, edx
mov eax, dword [ebp - 0x2c]
call fcn.004cd124
mov ebx, eax
mov eax, dword [ebp - 4]
mov dword [eax + 0x44], ebx
inc ebx
jne 0x4d2ff3
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 0x4d3062
lea eax, [ebp - 0x34]
mov edx, 2
call fcn.004048b8
ret