Function at 0x4053a0
Capabilities:
Check for peb beingdebugged flag
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x46cc21
mov eax, dword fs:[0]
push eax
sub esp, 0x54
mov eax, dword [0x490d1c]
xor eax, esp
mov dword [esp + 0x50], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x490d1c]
xor eax, esp
push eax
lea eax, [esp + 0x68]
mov dword fs:[0], eax
mov eax, dword [esp + 0x78]
mov edi, dword [esp + 0x7c]
xor ebx, ebx
mov dword [esp + 0x18], ebx
mov ecx, dword [str.AHABCD9999]
mov edx, dword [0x474e34]
mov dword [esp + 0x1c], eax
mov eax, dword [0x474e38]
mov dword [esp + 0x4c], ecx
mov ecx, dword [0x474e3c]
mov dword [esp + 0x54], eax
mov ax, word [0x474e44]
mov dword [esp + 0x50], edx
mov edx, dword [0x474e40]
mov dword [esp + 0x58], ecx
movzx ecx, word [esp + 0x4c]
mov dword [esp + 0x5c], edx
movzx edx, word [esp + 0x4e]
mov word [esp + 0x60], ax
movzx eax, word [esp + 0x50]
mov dword [esp + 0x20], ecx
movzx ecx, word [esp + 0x52]
mov dword [esp + 0x28], eax
movzx eax, word [esp + 0x56]
mov dword [esp + 0x24], edx
movzx edx, word [esp + 0x54]
mov dword [esp + 0x2c], ecx
movzx ecx, word [esp + 0x58]
mov dword [esp + 0x34], eax
movzx eax, word [esp + 0x5c]
mov dword [esp + 0x30], edx
movzx edx, word [esp + 0x5a]
mov dword [esp + 0x38], ecx
movzx ecx, word [esp + 0x5e]
mov dword [esp + 0x40], eax
mov eax, edi
mov dword [esp + 0x3c], edx
mov dword [esp + 0x70], ebx
mov dword [esp + 0x44], ecx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x405483
sub eax, edx
sar eax, 1
lea edx, [esp + 0x20]
mov ebp, eax
xor esi, esi
mov dword [esp + 0x14], edx
mov edi, edi
xor ecx, ecx
cmp ebp, ebx
jle 0x4054d3
mov eax, dword [edx]
movzx edx, word [edi + ecx*2]
add eax, edx
mov edx, ecx
shr edx, 1
movzx edx, word [edi + edx*2]
add eax, edx
add eax, esi
add eax, ecx
cdq
mov ebx, 0xc7
idiv ebx
inc ecx
cmp ecx, ebp
mov eax, edx
jl 0x4054a8
mov edx, dword [esp + 0x14]
mov dword [edx], eax
xor ebx, ebx
inc esi
add edx, 4
cmp esi, 0xa
mov dword [esp + 0x14], edx
jl 0x4054a0
call fcn.0043b055
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x4054fa
push 0x80004005
call fcn.00401530
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
mov ebp, dword [esp + 0x1c]
add eax, 0x10
mov dword [ebp], eax
mov dword [esp + 0x70], ebx
mov dword [esp + 0x18], 1
xor edi, edi
jmp 0x405520
mov esi, dword [esp + edi*4 + 0x20]
and esi, 0x8000000f
jns 0x405531
dec esi
or esi, 0xfffffff0
inc esi
mov dword [esp + edi*4 + 0x20], esi
call fcn.0043b055
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
je 0x4054f0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
push esi
lea ecx, [esp + 0x18]
push 0x474e28
push ecx
mov dword [esp + 0x7c], 1
call fcn.00402e00
mov esi, dword [esp + 0x20]
mov eax, dword [esi - 0xc]
add esp, 0xc
push eax
push esi
mov ecx, ebp
call fcn.00402cf0
lea eax, [esi - 0x10]
mov byte [esp + 0x70], bl
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4055a0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
inc edi
cmp edi, 0xa
jl 0x405520
push 0x474e24
push 4
mov ecx, ebp
call fcn.00401c00
mov eax, ebp
mov ecx, dword [esp + 0x68]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.00455930
add esp, 0x60
ret