Function at 0x401256
Capabilities:
Access peb ldr_data
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push esi
mov eax, dword [ebp + 8]
cmp dword [eax], 0
je 0x40126f
mov eax, 1
jmp 0x4014d5
mov ecx, dword fs:[0x30]
mov dword [ebp - 0x30], ecx
mov edx, dword [ebp - 0x30]
mov eax, dword [edx + 0xc]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
mov ecx, 4
shl ecx, 0
mov edx, dword [ebp - 0x34]
mov eax, dword [edx + ecx + 8]
mov dword [ebp - 0x1c], eax
jmp 0x4012b5
mov ecx, 4
imul edx, ecx, 0
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax + edx]
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x1c]
cmp dword [edx + 0x18], 0
je 0x401347
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax + 0x18]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0xc]
mov dword [ebp - 0x38], edx
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0xc]
add ecx, dword [eax + 0x3c]
mov dword [ebp - 0x3c], ecx
mov edx, dword [ebp - 0x3c]
add edx, 0x78
mov dword [ebp - 0x40], edx
mov eax, 8
imul ecx, eax, 0
mov edx, dword [ebp - 0x40]
mov eax, dword [edx + ecx]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x4012ff
jmp 0x4012a4
mov ecx, dword [ebp - 0xc]
add ecx, dword [ebp - 0x24]
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
add eax, dword [edx + 0xc]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x28]
mov edx, dword [ecx]
or edx, 0x20202020
cmp edx, 0x6c64746e
je 0x40132c
jmp 0x4012a4
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax + 4]
or ecx, 0x20202020
cmp ecx, 0x6c642e6c
jne 0x401342
jmp 0x401347
jmp 0x4012a4
cmp dword [ebp - 0x10], 0
jne 0x401354
xor eax, eax
jmp 0x4014d5
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x18]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0xc]
add edx, dword [ecx + 0x1c]
mov dword [ebp - 0x4c], edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
add ecx, dword [eax + 0x20]
mov dword [ebp - 0x44], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
add eax, dword [edx + 0x24]
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x14], 0
mov ecx, dword [ebp + 8]
add ecx, 4
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0xc]
add ecx, dword [eax + edx*4 - 4]
mov dword [ebp - 0x2c], ecx
mov edx, dword [ebp - 0x2c]
movzx eax, word [edx]
cmp eax, 0x775a
jne 0x4013ef
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.004014dc
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp - 8]
mov dword [ecx + edx*8], eax
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x48]
movzx ecx, word [eax + edx*2 - 2]
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 8]
mov esi, dword [ebp - 0x4c]
mov ecx, dword [esi + ecx*4]
mov dword [eax + edx*8 + 4], ecx
mov edx, dword [ebp - 0x14]
add edx, 1
mov dword [ebp - 0x14], edx
cmp dword [ebp - 0x14], 0x1000
jne 0x4013ef
jmp 0x401409
cmp dword [ebp - 0x14], 0x1000
jne 0x4013fa
jmp 0x401409
mov eax, dword [ebp - 0x18]
sub eax, 1
mov dword [ebp - 0x18], eax
jne 0x401391
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x14]
mov dword [ecx], edx
mov dword [ebp - 0x20], 0
jmp 0x401423
mov eax, dword [ebp - 0x20]
add eax, 1
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
sub edx, 1
cmp dword [ebp - 0x20], edx
jae 0x4014d0
mov dword [ebp - 4], 0
jmp 0x401446
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
sub edx, dword [ebp - 0x20]
sub edx, 1
cmp dword [ebp - 4], edx
jae 0x4014cb
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 4]
mov esi, dword [ebp - 8]
mov eax, dword [ecx + eax*8 + 4]
cmp eax, dword [esi + edx*8 + 0xc]
jbe 0x4014c6
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov eax, dword [edx + ecx*8]
mov dword [ebp - 0x54], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov eax, dword [edx + ecx*8 + 4]
mov dword [ebp - 0x50], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
mov esi, dword [ebp - 8]
mov eax, dword [esi + eax*8 + 8]
mov dword [edx + ecx*8], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
mov esi, dword [ebp - 8]
mov eax, dword [esi + eax*8 + 0xc]
mov dword [edx + ecx*8 + 4], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x54]
mov dword [edx + ecx*8 + 8], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x50]
mov dword [edx + ecx*8 + 0xc], eax
jmp 0x40143d
jmp 0x40141a
mov eax, 1
pop esi
mov esp, ebp
pop ebp
ret 4