Function at 0x40150f
Capabilities:
Parse pe header
Read file on windows

Disassembly:
jmp 0x405180
push 0xffffffffffffffff
push 0x484753
mov eax, dword fs:[0]
push eax
sub esp, 0x180
mov eax, dword [0x4a7168]
xor eax, esp
mov dword [esp + 0x17c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4a7168]
xor eax, esp
push eax
lea eax, [esp + 0x194]
mov dword fs:[0], eax
mov eax, dword [esp + 0x1a4]
mov ebx, ecx
cmp dword [ebx], 0
jne 0x405581
test eax, eax
je 0x405581
cmp byte [eax], 0
je 0x405581
push eax
call fcn.0041f4c0
push 0x48b3b0
push eax
mov dword [ebx], eax
call fcn.0041b600
mov edi, eax
add esp, 0xc
test edi, edi
je 0x405581
push edi
push 1
lea esi, [ebx + 4]
push 0x40
push esi
call fcn.0041f460
mov eax, 0x5a4d
add esp, 0x10
cmp word [esi], ax
jne 0x405578
mov ecx, dword [ebx + 0x40]
push 0
push ecx
push edi
call fcn.0041b8d0
push edi
push 1
lea esi, [ebx + 0x44]
push 0xf8
push esi
call fcn.0041f460
add esp, 0x1c
cmp dword [esi], 0x4550
jne 0x405578
movzx eax, word [ebx + 0x4a]
test ax, ax
jbe 0x405288
xor edx, edx
xor esi, esi
cmp dx, ax
jae 0x405288
lea ebp, [ebx + 0x13c]
push edi
push 1
lea eax, [esp + 0x70]
push 0x28
push eax
call fcn.0041f460
add esp, 0x10
lea ecx, [esp + 0x68]
push ecx
mov ecx, ebp
call fcn.0040149c
movzx edx, word [ebx + 0x4a]
inc esi
cmp esi, edx
jl 0x405261
mov eax, 0xcccccccd
mul dword [ebx + 0xc8]
mov esi, edx
shr esi, 4
dec esi
mov dword [esp + 0x14], esi
test esi, esi
jle 0x405574
xor ecx, ecx
mov eax, esi
mov edx, 0x14
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0041ed30
add esp, 4
mov esi, eax
mov eax, dword [ebx + 0xc4]
push 0
push eax
mov ecx, ebx
mov dword [esp + 0x20], esi
call fcn.00401ea6
push eax
push edi
call fcn.0041b8d0
mov ebp, dword [esp + 0x20]
add esp, 0xc
test ebp, ebp
jle 0x405306
push edi
push 1
push 0x14
push esi
call fcn.0041f460
add esp, 0x10
add esi, 0x14
sub ebp, 1
jne 0x4052e8
mov esi, dword [esp + 0x18]
mov ebp, dword [esp + 0x14]
lea ecx, [esp + 0x24]
call fcn.00401e01
xor ecx, ecx
push 0xfe
push ecx
lea edx, [esp + 0x9a]
push edx
mov dword [esp + 0x1a8], 0
mov word [esp + 0x9c], cx
call fcn.0041d330
add esp, 0xc
mov dword [esp + 0x1c], 0
test ebp, ebp
jle 0x405557
mov ebp, esi
mov dword [esp + 0x20], esi
lea ecx, [esp + 0x3c]
call fcn.00401f41
mov eax, dword [ebp]
mov dword [esp + 0x24], eax
mov ecx, dword [ebp + 4]
mov dword [esp + 0x28], ecx
mov edx, dword [ebp + 8]
mov dword [esp + 0x2c], edx
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x30], eax
mov ecx, dword [ebp + 0x10]
xor esi, esi
mov dword [esp + 0x34], ecx
cmp eax, esi
je 0x405553
push esi
push eax
mov ecx, ebx
call fcn.00401ea6
push eax
push edi
call fcn.0041b8d0
push edi
lea edx, [esp + 0xa0]
push 0x100
push edx
call fcn.0041e9a0
lea eax, [esp + 0xa8]
push eax
call fcn.0041f4c0
mov ecx, dword [esp + 0x50]
add esp, 0x1c
push esi
push ecx
mov ecx, ebx
mov dword [esp + 0x40], eax
mov dword [esp + 0x68], esi
call fcn.00401ea6
push eax
push edi
call fcn.0041b8d0
push edi
push 1
lea edx, [esp + 0x64]
push 4
push edx
call fcn.0041f460
add esp, 0x1c
cmp dword [esp + 0x50], esi
je 0x405416
lea ecx, [ecx]
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x40]
call fcn.004016b8
push edi
push 1
lea ecx, [esp + 0x58]
push 4
push ecx
call fcn.0041f460
add esp, 0x10
cmp dword [esp + 0x50], esi
jne 0x4053f0
mov ecx, dword [esp + 0x48]
sub ecx, dword [esp + 0x44]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x405529
mov ecx, dword [esp + 0x34]
lea ebp, [ecx + esi*4]
push esi
lea ecx, [esp + 0x40]
call fcn.00401226
push esi
lea ecx, [esp + 0x40]
mov dword [eax + 8], ebp
call fcn.00401226
test dword [eax], 0x80000000
push esi
lea ecx, [esp + 0x40]
je 0x40548a
call fcn.00401226
push esi
lea ecx, [esp + 0x40]
mov byte [eax + 4], 1
call fcn.00401226
mov ebp, dword [eax]
push esi
lea ecx, [esp + 0x40]
and ebp, 0x7fffffff
call fcn.00401226
mov dword [eax + 0xc], ebp
jmp 0x405503
call fcn.00401226
push esi
lea ecx, [esp + 0x40]
mov byte [eax + 4], 0
call fcn.00401226
mov edx, dword [eax]
push 0
and edx, 0x7fffffff
push edx
mov ecx, ebx
call fcn.00401ea6
push eax
push edi
call fcn.0041b8d0
add esp, 0xc
push edi
push 1
push 2
push esi
lea ecx, [esp + 0x4c]
call fcn.00401226
add eax, 0x14
push eax
call fcn.0041f460
push edi
lea eax, [esp + 0xa4]
push 0x100
push eax
call fcn.0041e9a0
lea ecx, [esp + 0xac]
push ecx
call fcn.0041f4c0
add esp, 0x20
push esi
lea ecx, [esp + 0x40]
mov ebp, eax
call fcn.00401226
mov dword [eax + 0x10], ebp
mov ecx, dword [esp + 0x48]
sub ecx, dword [esp + 0x44]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
inc esi
add eax, edx
cmp esi, eax
jb 0x405435
mov ebp, dword [esp + 0x20]
lea ecx, [esp + 0x24]
push ecx
lea ecx, [ebx + 0x150]
call fcn.0040133e
mov eax, dword [esp + 0x1c]
inc eax
add ebp, 0x14
cmp eax, dword [esp + 0x14]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ebp
jl 0x405350
mov esi, dword [esp + 0x18]
push esi
call fcn.0041ce10
add esp, 4
lea ecx, [esp + 0x3c]
mov dword [esp + 0x19c], 0xffffffff
call fcn.0040111d
mov al, 1
jmp 0x405583
push edi
call fcn.0041b6c0
add esp, 4
xor al, al
mov ecx, dword [esp + 0x194]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x17c]
xor ecx, esp
call fcn.0041d320
add esp, 0x18c
ret 4