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

Disassembly:
sub esp, 0x18
push ebp
push esi
mov esi, dword [ebx + 0x50]
test esi, esi
push edi
je 0x5a6fff
cmp dword [esi + 0x58], 0
je 0x5a6fff
mov eax, dword [ebx + 4]
xor ebp, ebp
cmp eax, dword [ebx + 8]
je 0x5a6fff
call fcn.0057bdb0
cmp eax, 1
jne 0x5a6fff
mov eax, dword [ebx + 0x48]
test eax, eax
je 0x5a6dcc
add eax, 0x168
call fcn.0057a810
mov esi, eax
jmp 0x5a6dce
xor esi, esi
mov ecx, dword [ebx + 4]
test ecx, ecx
jne 0x5a6de7
cmp dword [ebx + 8], 2
jne 0x5a6de7
lea eax, [esi + 1]
cdq
sub eax, edx
sar eax, 1
mov ebp, esi
sub ebp, eax
cmp ecx, 2
jne 0x5a6dfe
cmp dword [ebx + 8], 0
jne 0x5a6dfe
lea eax, [esi + 1]
cdq
sub eax, edx
mov ebp, eax
sar ebp, 1
sub ebp, esi
test ebp, ebp
je 0x5a6fff
cmp dword [ebx + 0x4c], 0
je 0x5a6faa
xor edi, edi
mov esi, dword [ebx + 0x4c]
mov ecx, dword [esi + 0x80]
test ecx, ecx
jne 0x5a6e23
xor eax, eax
jmp 0x5a6e2e
mov eax, dword [esi + 0x84]
sub eax, ecx
sar eax, 2
cmp edi, eax
jge 0x5a6f8c
test ecx, ecx
je 0x5a6e49
mov eax, dword [esi + 0x84]
sub eax, ecx
sar eax, 2
cmp edi, eax
jb 0x5a6e4e
call fcn.005d29f1
mov ecx, dword [esi + 0x80]
mov edx, dword [ecx + edi*4]
cmp dword [edx + 0x2c], 0
je 0x5a6f8c
mov esi, dword [ebx + 0x4c]
mov ecx, dword [esi + 0x80]
add esi, 0x7c
test ecx, ecx
je 0x5a6e7d
mov eax, dword [esi + 8]
sub eax, ecx
sar eax, 2
cmp edi, eax
jb 0x5a6e82
call fcn.005d29f1
mov eax, dword [esi + 4]
mov eax, dword [eax + edi*4]
test eax, eax
je 0x5a6f47
movzx eax, byte [eax]
and eax, 1
xor ecx, ecx
test eax, eax
sete cl
mov eax, ecx
test eax, eax
je 0x5a6f47
mov eax, dword [ebx + 0x4c]
cmp dword [eax + 0x90], 0
je 0x5a6eca
lea esi, [eax + 0x7c]
call fcn.0057a830
mov edx, dword [eax]
push ebp
push 0
add edx, 0xc
push edx
call dword [sym.imp.USER32.dll_OffsetRect]
mov esi, dword [ebx + 0x4c]
mov ecx, dword [esi + 0x80]
add esi, 0x7c
test ecx, ecx
je 0x5a6ee6
mov eax, dword [esi + 8]
sub eax, ecx
sar eax, 2
cmp edi, eax
jb 0x5a6eeb
call fcn.005d29f1
mov eax, dword [esi + 4]
mov ecx, dword [eax + edi*4]
push ebp
push 0
add ecx, 0x1c
push ecx
call dword [sym.imp.USER32.dll_OffsetRect]
mov esi, dword [ebx + 0x4c]
mov eax, dword [esi + 0x80]
add esi, 0x7c
test eax, eax
je 0x5a6f1a
mov ecx, dword [esi + 8]
sub ecx, eax
sar ecx, 2
cmp edi, ecx
jb 0x5a6f1f
call fcn.005d29f1
mov edx, dword [esi + 4]
mov eax, dword [edx + edi*4]
test dword [eax], 0x3442100
je 0x5a6f47
mov esi, dword [ebx + 0x4c]
add esi, 0x7c
call fcn.0057a830
mov eax, dword [eax]
push ebp
push 0
add eax, 0x4c
push eax
call dword [sym.imp.USER32.dll_OffsetRect]
mov esi, dword [ebx + 0x4c]
cmp dword [esi + 0x30], 2
jne 0x5a6f84
mov ecx, dword [esi + 0x80]
test ecx, ecx
je 0x5a6f69
mov eax, dword [esi + 0x84]
sub eax, ecx
sar eax, 2
cmp edi, eax
jb 0x5a6f6e
call fcn.005d29f1
mov ecx, dword [esi + 0x80]
mov edx, dword [ecx + edi*4]
push ebp
push 0
add edx, 0x3c
push edx
call dword [sym.imp.USER32.dll_OffsetRect]
add edi, 1
jmp 0x5a6e12
mov eax, dword [ebx + 0x4c]
mov ecx, dword [eax + 0x3e8]
cmp dword [ecx - 0xc], 0
jne 0x5a6faa
push ebp
push 0
add eax, 0x3fc
push eax
call dword [sym.imp.USER32.dll_OffsetRect]
cmp dword [ebx + 0x98], 0
je 0x5a6fff
cmp dword [ebx + 0x78], 0
je 0x5a6fff
mov eax, dword [ebx + 0x6c]
mov edx, dword [ebx + 0x68]
mov ecx, dword [ebx + 0x70]
push ebp
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], edx
mov edx, dword [ebx + 0x74]
push 0
lea eax, [esp + 0x18]
push eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], edx
call dword [sym.imp.USER32.dll_OffsetRect]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov dword [ebx + 0x68], ecx
mov ecx, dword [esp + 0x1c]
mov dword [ebx + 0x6c], edx
mov dword [ebx + 0x70], eax
mov dword [ebx + 0x74], ecx
pop edi
pop esi
pop ebp
add esp, 0x18
ret