Function at 0x59a021
Capabilities:
Access peb ldr_data
Check for peb beingdebugged flag
Parse pe header

Disassembly:
push eax
jmp 0x59601a
call 0x596007
jmp 0x596339
push eax
pushal
mov cx, bx
mov bx, 0x3c2e
jmp 0x5963c5
int3
pop word [esp]
push dword [esp + 5]
lea esp, [esp + 2]
lea esp, [esp + 0xc]
jmp 0x59603f
pop eax
sub eax, 0xeba11e4f
add eax, 0xeba10bb8
xchg dword [esp + 4], eax
popfd
push dword fs:[0]
mov dword fs:[0], esp
pushal
lea ebx, [edi + 0x6606]
mov cl, ch
mov cx, 0x49a1
mov cx, di
mov al, bh
mov ah, byte [esp]
mov eax, dword [esp]
xchg ah, ch
mov eax, dword [esp]
mov bx, di
mov cl, 0xe4
mov al, 0xdf
mov bh, 0x94
popal
push esi
lea esp, [esp]
mov byte [esp + 2], dh
pop word [esp]
pushfd
push word [esp + 2]
mov dword [esp + 1], edi
lea esp, [esp]
mov byte [esp + 5], ah
push dword [esp + 4]
mov word [esp + 4], cx
jmp 0x596075
setnp cl
mov dl, bh
mov ecx, dword [esp]
mov dl, bh
bswap bx
mov eax, dword [esp]
mov al, cl
setle dh
pushfd
mov ax, word [esp + 3]
mov dx, 0x531a
xchg byte [esp + 2], al
lea esp, [esp + 4]
popal
push esi
mov byte [esp + 1], cl
pop word [esp]
push bx
mov dword [esp], ecx
lea esp, [esp]
push dword [esp + 3]
mov byte [esp + 3], dh
push word [esp + 6]
lea esp, [esp + 4]
mov word [esp + 1], bx
push di
lea esp, [esp + 8]
pushfd
jmp 0x596002
call 0x599ff1
jmp 0x59a1ad
call 0x59a021
dec esi
outsd dx, dword [esi]
outsd dx, dword [esi]
bound edi, qword [ecx + 0x50]
jb 0x59a07e
je 0x59a076
arpl word [eax + 0x4c], si
imul esi, dword [ebp + 0x20], 0x2e372e31
xor byte [esi], ch
xor byte [eax], al
lea esp, [esp + 4]
pushal
mov dword [esp + 4], esp
lea esp, [esp + 0x18]
mov dword [esp + 1], eax
mov byte [esp + 3], al
pop word [esp + 1]
mov byte [esp + 1], al
lea esp, [esp + 2]
mov dword [esp], eax
push bp
mov byte [esp], ch
mov word [esp], bp
mov byte [esp], dh
push word [esp]
pushfd
lea esp, [esp + 3]
pop word [esp]
lea esp, [esp + 3]
push ecx
push ebx
lea esp, [esp + 1]
push esp
lea esp, [esp + 4]
pushfd
lea esp, [esp + 3]
mov dword [esp], edx
pushal
pop dword [esp + 8]
lea esp, [esp + 0x11]
lea esp, [esp + 8]
lea esp, [esp]
adc dword [ebp - 0x72f7db9c], ecx
and al, 0x24
mov word [esp], di
lea esp, [esp + 2]
push cx
mov byte [esp + 1], bl
lea esp, [esp + 1]
lea esp, [esp]
pushal
push word [esp + 8]
push dword [esp + 0x1c]
mov dword [esp + 0x24], ebx
pushfd
push cx
mov word [esp], dx
push esi
mov byte [esp + 5], ch
mov dword [esp + 1], edi
push dword [esp]
mov byte [esp + 3], bl
mov byte [esp + 0xb], bh
mov word [esp + 7], dx
pop dword [esp + 5]
push esp
pop word [esp + 9]
mov dword [esp + 0x2c], esp
pushfd
pop word [esp]
mov byte [esp], bl
mov word [esp], si
mov byte [esp], ch
push esp
pushfd
push dword [esp + 2]
mov word [esp + 5], dx
mov word [esp + 0xa], bx
lea esp, [esp + 2]
mov dword [esp + 0x34], ebp
push edx
mov byte [esp + 1], ah
pop word [esp]
mov byte [esp], ah
mov word [esp], bx
lea esp, [esp]
mov word [esp], bx
lea esp, [esp]
lea esp, [esp + 1]
push bx
mov word [esp], bp
mov byte [esp], dh
pushfd
lea esp, [esp + 3]
mov dword [esp + 0x34], esi
push eax
push dword [esp + 1]
mov byte [esp + 4], bl
mov byte [esp + 6], ah
mov dword [esp + 1], edx
push dword [esp + 6]
mov byte [esp + 0xa], ch
mov word [esp + 1], ax
mov word [esp + 6], bp
mov byte [esp + 2], dh
pop word [esp + 7]
mov word [esp + 1], dx
push word [esp + 2]
mov byte [esp + 9], cl
mov dword [esp + 0x3c], edi
lea esp, [esp + 0x3c]
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x1c]
mov eax, dword [eax]
mov eax, dword [eax + 8]
push eax
jmp 0x599fec
movzx ebx, word [eax + 0x3c]
add ebx, eax
jmp 0x59a224
pop eax
xor ax, ax
cmp word [eax], 0x5a4d
je 0x59a18c
sub eax, 0x10000
jmp 0x59a1b1
cmp word [ebx], 0x4550
je 0x594db7
jmp 0x59a1b8