Function at 0x401000
Capabilities:
Parse pe header

Disassembly:
sub esp, 0xc
push ebx
mov ebx, dword [esp + 0x14]
push ebp
xor eax, eax
cmp ebx, eax
push esi
push edi
mov dword [esp + 0x18], eax
je 0x401240
mov ebp, dword [ebx + 0x3c]
add ebp, ebx
cmp word [ebx], 0x5a4d
mov dword [esp + 0x10], ebp
jne 0x401274
cmp dword [ebp], 0x4550
jne 0x401274
cmp word [ebp + 4], 0x14c
jne 0x401274
movzx ecx, word [ebp + 0x14]
movzx edx, word [ebp + 6]
cmp edx, eax
lea esi, [ecx + ebp + 0x18]
mov dword [esp + 0x14], esi
jle 0x401079
lea ecx, [esi + 0xc]
mov edi, edx
nop
mov edx, dword [ecx + 4]
mov esi, dword [ecx]
add edx, esi
cmp edx, eax
jbe 0x40106d
mov eax, edx
add ecx, 0x28
sub edi, 1
jne 0x401060
mov esi, dword [esp + 0x14]
mov ecx, dword [ebp + 0x38]
xor edx, edx
div ecx
test edx, edx
je 0x401087
add eax, 1
imul ecx, eax
test ecx, ecx
je 0x401240
push 0x40
push 0x1000
push ecx
push 0
sub esi, ebx
call dword [0x408008]
mov edi, eax
test edi, edi
je 0x401274
test esi, esi
jbe 0x4010c9
mov ecx, ebx
sub ecx, edi
mov edx, esi
mov bl, byte [ecx + eax]
mov byte [eax], bl
add eax, 1
sub edx, 1
jne 0x4010b8
mov ebx, dword [esp + 0x20]
movzx edx, word [ebp + 6]
lea edx, [edx + edx*4]
add edx, edx
add edx, edx
add edx, edx
je 0x4010ee
mov ecx, ebx
lea eax, [esi + edi]
sub ecx, edi
mov esi, edx
mov dl, byte [eax + ecx]
mov byte [eax], dl
add eax, 1
sub esi, 1
jne 0x4010e1
xor esi, esi
cmp word [ebp + 6], si
jbe 0x401135
mov edx, dword [esp + 0x14]
movzx ecx, si
lea ecx, [ecx + ecx*4]
xor eax, eax
cmp dword [edx + ecx*8 + 0x10], eax
lea ecx, [edx + ecx*8]
jbe 0x40112c
jmp 0x401110
mov edx, dword [ecx + 0x14]
mov ebp, dword [ecx + 0xc]
add edx, eax
mov dl, byte [edx + ebx]
add ebp, eax
add eax, 1
mov byte [edi + ebp], dl
cmp eax, dword [ecx + 0x10]
jb 0x401110
mov ebp, dword [esp + 0x10]
add esi, 1
cmp si, word [ebp + 6]
jb 0x4010f6
mov ebp, dword [edi + 0x3c]
add ebp, edi
lea eax, [ebp + 0x80]
test eax, eax
mov dword [esp + 0x10], ebp
je 0x401266
mov eax, dword [eax]
test eax, eax
je 0x401266
lea esi, [eax + edi]
mov eax, dword [esi + 0xc]
add eax, edi
push eax
mov dword [esp + 0x24], esi
call dword [0x40800c]
mov ebx, eax
test ebx, ebx
je 0x4011d2
mov ebp, dword [0x408004]
jmp 0x40117b
mov esi, dword [esp + 0x20]
mov esi, dword [esi + 0x10]
add esi, edi
cmp dword [esi], 0
je 0x4011b1
mov eax, dword [esi]
test eax, eax
jns 0x401192
and eax, 0xffff
jmp 0x401196
lea eax, [eax + edi + 2]
push eax
push ebx
call ebp
test eax, eax
mov dword [esi], eax
je 0x4011aa
add esi, 4
cmp dword [esi], 0
jne 0x401185
jmp 0x4011b1
push ebx
call dword [section..rdata]
add dword [esp + 0x20], 0x14
je 0x4011ce
mov ecx, dword [esp + 0x20]
mov eax, dword [ecx + 0xc]
add eax, edi
push eax
call dword [0x40800c]
mov ebx, eax
test ebx, ebx
jne 0x401177
mov ebp, dword [esp + 0x10]
mov edx, dword [ebp + 0xa0]
add edx, edi
cmp dword [edx], 0
je 0x40122b
nop
mov eax, dword [edx + 4]
sub eax, 8
shr eax, 1
test eax, eax
lea esi, [edx + 8]
jle 0x40121f
mov ebx, eax
movzx eax, word [esi]
mov ecx, eax
shr ecx, 0xc
cmp ecx, 0xa
je 0x401203
cmp ecx, 3
jne 0x401217
mov ebp, dword [esp + 0x10]
and eax, 0xfff
add eax, dword [edx]
mov ecx, edi
sub ecx, dword [ebp + 0x34]
add eax, edi
add dword [eax], ecx
add esi, 2
sub ebx, 1
jne 0x4011f1
add edx, dword [edx + 4]
cmp dword [edx], 0
jne 0x4011e0
mov ebp, dword [esp + 0x10]
mov eax, dword [ebp + 0x28]
add eax, edi
je 0x40124c
mov edx, dword [esp + 0x24]
push edx
push 1
push edi
call eax
mov dword [esp + 0x18], edi
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
push 0x8000
push 0
push edi
call dword [0x408010]
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
push 0x8000
push 0
push edi
call dword [0x408010]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret