Function at 0x59a510
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x5c
mov ebp, dword [esp + 0x74]
mov esi, dword [esp + 0x78]
mov edx, dword [esp + 0x70]
cmp ebp, 3
jb 0x59a545
movzx eax, word [edx]
movzx edi, byte [edx + 2]
xor eax, 0xbbef
xor edi, 0xbf
or di, ax
jne 0x59a545
add ebp, 0xfffffffd
add edx, 3
mov ebx, dword [esi + 4]
cmp byte [esi + 3], 0
movzx ecx, byte [esi + 1]
mov eax, 1
movzx edi, word [esi + 5]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], ebp
mov dword [esp + 0x24], 0
cmove eax, ebx
mov byte [esp + 0x28], cl
rol di, 8
mov byte [esp + 0x29], al
movzx eax, byte [esi]
mov byte [esp + 0x2a], bl
mov word [esp + 0x2b], di
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 1
mov dword [esp + 0x18], 0
mov byte [esp + 0x34], 0x80
mov byte [esp + 0x30], 0
mov byte [esp + 0x32], al
movzx eax, byte [esi + 2]
mov byte [esp + 0x33], al
mov eax, dword [esi + 8]
mov byte [esp + 0x31], 1
test eax, eax
je 0x59a786
mov edx, dword [esp + 0x7c]
mov ecx, dword [esp + 0x80]
lea ebp, [esp + 0x10]
lea esi, [esp + 0x38]
dec eax
mov dword [esp + 0x48], edx
mov dword [esp + 0x38], SysReAllocString
mov dword [esp + 0x3c], ecx
mov ecx, ebp
mov edx, esi
mov dword [esp + 0x4c], eax
call fcn.00594ed0
mov edi, esp
mov edx, ebp
mov ebx, eax
mov ecx, edi
call fcn.00596d90
cmp byte [esp], 0
je 0x59a619
mov ecx, dword [esp + 4]
test ebx, ebx
jne 0x59a62a
test ecx, ecx
jne 0x59a635
mov bl, 1
jmp 0x59a71c
xor ecx, ecx
cmp byte [esp + 1], 0
jne 0x59a757
test ebx, ebx
je 0x59a60e
test ecx, ecx
je 0x59a633
call fcn.0059a0d0
mov ecx, ebx
mov dword [esp + 0xc], ecx
mov ebx, dword [esp + 0x84]
mov edx, 0xffffffff
mov eax, dword [ecx + 0xc]
test eax, eax
cmovs eax, edx
mov dword [ebx], eax
mov eax, dword [ecx + 0x10]
mov dword [esp], 0
mov dword [esp + 4], 1
mov dword [esp + 0x54], 0
mov dword [esp + 0x48], 0x20
mov byte [esp + 0x58], 3
mov dword [esp + 0x38], 0
mov dword [esp + 0x40], 0
mov dword [esp + 0x4c], edi
mov dword [esp + 8], 0
mov dword [esp + 0x50], 0x792da8
test eax, eax
cmovns edx, eax
lea eax, [esp + 0xc]
mov dword [ebx + 4], edx
mov dword [ebx + 0x10], 0
push esi
push eax
call fcn.005a9790
add esp, 8
test al, al
jne 0x59a786
mov ebp, dword [esp + 8]
mov eax, dword [esp + 0x84]
xor ebx, ebx
mov edi, dword [esp]
mov esi, dword [esp + 4]
cmp dword [eax + 8], ebp
jb 0x59a73d
mov eax, dword [esp + 0x84]
mov eax, dword [eax + 0xc]
add eax, ebx
push ebp
push esi
push eax
call fcn.00654250
add esp, 0xc
add ebx, ebp
jb 0x59a786
mov eax, dword [esp + 0x84]
test edi, edi
mov dword [eax + 0x10], ebx
je 0x59a711
push 1
push edi
push esi
call fcn.004afc10
add esp, 0xc
mov ecx, dword [esp + 0xc]
call fcn.0059a0d0
xor ebx, ebx
mov eax, dword [esp + 0x10]
test eax, eax
je 0x59a733
push 1
push eax
push dword [esp + 0x1c]
call fcn.004afc10
add esp, 0xc
mov eax, ebx
add esp, 0x5c
pop esi
pop edi
pop ebx
pop ebp
ret
mov ebx, dword [esp + 0x84]
xor edx, edx
lea ecx, [ebx + 8]
push ebp
call fcn.006ec7f0
add esp, 4
mov ebx, dword [ebx + 0x10]
jmp 0x59a6d8
lea eax, [esp + 0x1c]
mov dword [esp + 0x38], 0x18
push eax
call fcn.005ab0f0
add esp, 4
push edx
push eax
push esi
call fcn.006fd1f0
add esp, 0xc
mov ecx, eax
test ebx, ebx
jne 0x59a62a
jmp 0x59a60e
ud2