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

Disassembly:
sub esp, 0x2c
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [esp + 0x30]
push ebx
push ebp
push esi
mov ebx, dword [eax + 0x44]
mov dword [esp + 0x1c], ebx
lea eax, [ebx + 0x21]
shr eax, 0xc
lea ebp, [eax + 1]
lea eax, [eax + eax*4]
mov dword [esp + 0x18], ebp
lea eax, [ebx + eax*2]
lea esi, [eax*2 + 0x1c]
call fcn.0058a370
test eax, eax
jne 0x5962b9
mov eax, 0x1000
mov ecx, ebx
cmp ebx, eax
cmova ecx, eax
xor eax, eax
add ecx, ecx
add ecx, esi
adc eax, eax
push eax
push ecx
call fcn.00557720
mov ebx, eax
add esp, 8
mov dword [esp + 0xc], ebx
test ebx, ebx
je 0x5962b9
push edi
push esi
push 0
push ebx
call fcn.00423ff0
mov edi, dword [esp + 0x50]
lea eax, [esi + ebx]
mov ecx, dword [esp + 0x4c]
add esp, 0xc
mov dword [ebx + 4], ebp
mov dword [esp + 0x24], eax
lea edi, [edi + 0x22]
mov dword [ecx + 0x78], ebx
shr edi, 0xc
cmp edi, ebp
jge 0x5962a3
lea eax, [esp + 0x34]
push eax
push edi
push ecx
call fcn.005954e0
mov ebx, dword [esp + 0x40]
add esp, 0xc
mov ebp, eax
test ebx, ebx
je 0x596157
lea ecx, [ebx + 0x4000]
mov dword [esp + 0x30], ecx
test edi, edi
jne 0x596146
add ebx, 0x88
xor esi, esi
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], esi
jmp 0x5961f6
mov esi, edi
shl esi, 0xc
sub esi, 0x22
mov dword [esp + 0x38], esi
jmp 0x5961f6
test ebp, ebp
jne 0x5961ee
mov ebp, 1
mov dword [esp + 0x14], ebp
mov edx, dword [esp + 0x10]
inc edi
mov ecx, dword [esp + 0x40]
test ebp, ebp
mov ebp, dword [esp + 0x1c]
je 0x596102
mov eax, ecx
mov dword [eax + 0x78], 0
cmp dword [0x635d20], 0
je 0x596285
mov eax, dword [0x63cf30]
test eax, eax
je 0x5961a2
push eax
call dword [0x635d70]
add esp, 4
mov esi, dword [esp + 0x10]
push esi
call dword [0x635d4c]
sub dword [0x63ced0], eax
dec dword [0x63cef4]
push esi
call dword [0x635d44]
mov eax, dword [0x63cf30]
add esp, 8
test eax, eax
je 0x59628f
push eax
call dword [0x635d78]
mov ecx, dword [esp + 0x4c]
add esp, 4
mov eax, dword [esp + 0x14]
xor ebx, ebx
pop edi
pop esi
pop ebp
mov dword [ecx], ebx
pop ebx
add esp, 0x2c
ret
mov esi, dword [esp + 0x38]
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x14], ebp
test ebp, ebp
jne 0x596168
lea eax, [edi + 1]
mov dword [esp + 0x2c], eax
cmp eax, dword [esp + 0x1c]
jne 0x596217
mov ecx, dword [esp + 0x20]
sub ecx, esi
jmp 0x59621c
sub ecx, ebx
sar ecx, 2
mov edx, dword [esp + 0x10]
mov dword [esp + 0x18], ecx
mov eax, dword [edx + 4]
lea eax, [eax + eax*4]
lea eax, [esi + eax*2]
inc esi
lea edx, [edx + eax*2]
mov dword [esp + 0x38], esi
add edx, 8
xor eax, eax
mov dword [esp + 0x28], edx
test ecx, ecx
jle 0x59624b
mov word [edx + eax*2], ax
inc eax
cmp eax, ecx
jl 0x596242
lea eax, [esp + 0x18]
push eax
push edx
push dword [esp + 0x2c]
push ebx
call fcn.00596570
mov edx, dword [esp + 0x20]
lea eax, [edi + edi*4]
mov edi, dword [esp + 0x3c]
lea ecx, [edx + eax*4]
mov eax, dword [esp + 0x28]
add esp, 0x10
mov dword [ecx + 0x14], eax
mov eax, dword [esp + 0x28]
mov dword [ecx + 0x18], esi
mov dword [ecx + 0xc], eax
mov dword [ecx + 0x10], ebx
jmp 0x59616d
push edx
call dword [0x635d44]
add esp, 4
mov ecx, dword [esp + 0x48]
xor ebx, ebx
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
mov dword [ecx], ebx
pop ebx
add esp, 0x2c
ret
mov ecx, dword [esp + 0x48]
mov ebx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
mov dword [ecx], ebx
pop ebx
add esp, 0x2c
ret
pop esi
pop ebp
mov eax, 7
pop ebx
add esp, 0x2c
ret