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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
or dword [ebp - 0x10], 0xffffffff
push ebx
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + 0x50]
push esi
push edi
mov dword [ebp - 8], eax
mov eax, dword [ebx + 0x14]
xor edi, edi
cmp eax, edi
mov esi, ecx
mov dword [ebp - 0x34], esi
je 0x59c084
cmp dword [eax + 0x14], edi
je 0x59c084
mov ecx, dword [eax + 0x2c]
sub ecx, dword [eax + 0x50]
add dword [ebp - 8], ecx
mov eax, dword [ebx + 0x2c]
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
call fcn.00539c60
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x14], eax
mov eax, dword [ebx + 0x40]
imul eax, eax, 7
pop ecx
push eax
mov eax, dword [esi + 4]
push dword [eax + 0x28]
lea ecx, [ebp - 0x54]
call fcn.0059cc5c
lea eax, [ebp + 0xf]
push eax
lea eax, [ebp + 0xb]
push eax
push ebx
mov ecx, esi
call fcn.0059b7b6
cmp dword [ebp - 0x30], edi
mov dword [ebp - 0x2c], edi
jle 0x59c6a7
lea ecx, [ebp - 0x40]
call fcn.00593023
push dword [ebp + 0x14]
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 4]
push eax
mov ecx, esi
call fcn.0059bb8a
mov eax, dword [ebp - 0x3c]
push edi
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x24], eax
call fcn.00593030
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 4]
movzx eax, byte [eax]
inc dword [ebp - 4]
mov dword [ebp + 0x10], eax
and eax, 0xf
je 0x59c140
cmp eax, 1
je 0x59c457
jle 0x59c663
cmp eax, 3
jle 0x59c2d9
cmp eax, 4
je 0x59c1d7
cmp eax, 5
je 0x59c16d
cmp eax, 6
jne 0x59c663
lea eax, [ebp - 4]
push eax
call fcn.00539c60
cmp byte [ebp + 0xb], 0
pop ecx
mov dword [ebp - 0xc], eax
jne 0x59c156
mov dword [ebp - 0xc], edi
cmp dword [ebp - 0xc], edi
jne 0x59c5d5
mov eax, dword [ebp - 0x18]
inc dword [ebp - 0x18]
mov dword [ebp - 0xc], eax
jmp 0x59c5d8
lea eax, [ebp - 4]
push eax
call fcn.00539c60
cmp byte [ebp + 0xb], 0
pop ecx
mov dword [ebp - 0xc], eax
jne 0x59c183
mov dword [ebp - 0xc], edi
cmp dword [ebp - 0xc], edi
jne 0x59c193
mov eax, dword [ebp - 0x18]
inc dword [ebp - 0x18]
mov dword [ebp - 0xc], eax
jmp 0x59c196
dec dword [ebp - 0xc]
lea eax, [ebp - 4]
push eax
call fcn.00539c60
cmp dword [ebp - 0x10], 0xffffffff
pop ecx
mov ecx, dword [esi + 0x78]
mov eax, dword [ecx + eax*4]
je 0x59c1b5
mov ecx, dword [ebp - 0x10]
or dword [ebp - 0x10], 0xffffffff
jmp 0x59c1bc
mov ecx, dword [ebp - 8]
add dword [ebp - 8], 4
lea edx, [ebp - 0x54]
push edx
push edi
push ecx
push dword [eax]
mov ecx, ebx
push dword [ebp + 0x14]
push dword [ebp - 0xc]
push edi
call fcn.0059ae46
jmp 0x59c3ad
lea eax, [ebp - 4]
push eax
call fcn.00539c60
cmp byte [ebp + 0xb], 0
pop ecx
mov dword [ebp - 0xc], eax
jne 0x59c1ed
mov dword [ebp - 0xc], edi
cmp dword [ebp - 0xc], edi
jne 0x59c1fd
mov eax, dword [ebp - 0x18]
inc dword [ebp - 0x18]
mov dword [ebp - 0xc], eax
jmp 0x59c200
dec dword [ebp - 0xc]
lea eax, [ebp - 4]
push eax
call fcn.00539c60
cmp eax, dword [esi + 0xe4]
pop ecx
mov dword [ebp - 0x1c], eax
jb 0x59c25b
mov eax, dword [ebp + 0x14]
mov eax, dword [eax + 0x44]
mov eax, dword [eax + 0x54]
cmp eax, edi
jne 0x59c22c
mov ecx, dword [ebp + 0x14]
push 0x15
call fcn.00581d1f
mov ecx, dword [esi + 4]
push edi
push edi
push edi
push edi
push dword [esi + 0xe4]
mov dword [ebp - 0x28], eax
call fcn.00583717
mov ecx, dword [esi + 4]
push eax
push dword [ebp - 0x1c]
call fcn.00583717
mov ecx, dword [ebp - 0x28]
push eax
push 0x424
call fcn.00583009
mov eax, dword [esi + 0x9c]
mov ecx, dword [ebp - 0x1c]
mov eax, dword [eax + ecx*4]
cmp eax, edi
mov dword [ebp - 0x24], eax
jne 0x59c2a6
mov eax, dword [ebp + 0x14]
mov eax, dword [eax + 0x44]
mov eax, dword [eax + 0x54]
cmp eax, edi
jne 0x59c285
mov ecx, dword [ebp + 0x14]
push 0x15
call fcn.00581d1f
mov ecx, dword [esi + 4]
push edi
push edi
push edi
push edi
push edi
push dword [ebp - 0x1c]
mov dword [ebp - 0x28], eax
call fcn.00583717
mov ecx, dword [ebp - 0x28]
push eax
push 0x423
call fcn.00583009
mov eax, dword [ebp - 0x10]
cmp eax, 0xffffffff
je 0x59c2b4
or dword [ebp - 0x10], 0xffffffff
jmp 0x59c2bb
mov eax, dword [ebp - 8]
add dword [ebp - 8], 4
lea ecx, [ebp - 0x54]
push ecx
push edi
push eax
mov eax, dword [ebp - 0x24]
push dword [eax]
mov ecx, ebx
push dword [ebp + 0x14]
push dword [ebp - 0xc]
push edi
call fcn.0059ae46
jmp 0x59c663
lea eax, [ebp - 4]
push eax
call fcn.00539c60
cmp byte [ebp + 0xf], 0
pop ecx
mov dword [ebp - 0xc], eax
jne 0x59c2ef
mov dword [ebp - 0xc], edi
lea eax, [ebp - 4]
push eax
call fcn.00539c60
pop ecx
push dword [ebp + 0x14]
mov ecx, dword [esi + 0x78]
push dword [ebp + 0x10]
mov eax, dword [ecx + eax*4]
push dword [ebp - 0x24]
mov ecx, ebx
push dword [ebp - 0x28]
mov dword [ebp - 0x1c], eax
call fcn.0059bd59
push dword [ebp - 0x28]
mov ecx, ebx
push dword [ebp - 0x24]
mov dword [ebp - 0x20], eax
call fcn.0059a3f4
cmp dword [ebp - 0xc], edi
jbe 0x59c3c2
dec dword [ebp - 0xc]
cmp dword [ebp - 0x20], edi
jne 0x59c3a0
push dword [ebp - 0xc]
mov ecx, ebx
call fcn.00542b40
test eax, eax
je 0x59c3a0
push dword [ebp - 0xc]
mov ecx, ebx
call fcn.00542b40
cmp eax, dword [ebp - 0x1c]
je 0x59c3a0
mov eax, dword [ebp + 0x14]
mov eax, dword [eax + 0x44]
mov eax, dword [eax + 0x54]
cmp eax, edi
jne 0x59c36a
mov ecx, dword [ebp + 0x14]
push 0x15
call fcn.00581d1f
mov ecx, dword [esi + 4]
push edi
push edi
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0xc]
push edi
push edi
inc eax
push eax
call fcn.00583717
push eax
push dword [ebp - 0xc]
mov ecx, ebx
call fcn.00542b40
mov ecx, dword [esi + 4]
push eax
call fcn.00583732
mov ecx, dword [ebp - 0x28]
push eax
push 0x431
call fcn.00583009
push dword [ebp - 0x1c]
mov ecx, ebx
push dword [ebp - 0xc]
call fcn.0059cb5f
test byte [ebp + 0x10], 0x40
je 0x59c68d
mov eax, dword [ebx + 0x40]
add eax, dword [ebp - 0xc]
jmp 0x59c524
cmp dword [ebp - 0x20], edi
mov ecx, ebx
je 0x59c3d4
mov edi, dword [ebp - 0x20]
shr edi, 3
jmp 0x59c50c
push dword [ebp - 0x14]
call fcn.00542b40
test eax, eax
je 0x59c42b
mov eax, dword [ebp + 0x14]
mov eax, dword [eax + 0x44]
mov eax, dword [eax + 0x54]
cmp eax, edi
jne 0x59c3f7
mov ecx, dword [ebp + 0x14]
push 0x15
call fcn.00581d1f
mov ecx, dword [esi + 4]
push edi
push edi
push edi
push edi
push dword [ebp - 0x14]
mov dword [ebp - 0x28], eax
call fcn.00583717
push eax
push dword [ebp - 0x14]
mov ecx, ebx
call fcn.00542b40
mov ecx, dword [esi + 4]
push eax
call fcn.00583732
mov ecx, dword [ebp - 0x28]
push eax
push 0x431
call fcn.00583009
push dword [ebp - 0x1c]
mov ecx, ebx
push dword [ebp - 0x14]
call fcn.0059cb5f
test byte [ebp + 0x10], 0x40
je 0x59c44f
mov eax, dword [ebx + 0x40]
push dword [ebp - 4]
add eax, dword [ebp - 0x14]
mov ecx, ebx
push eax
call fcn.0059a9c6
inc dword [ebp - 0x14]
jmp 0x59c663
lea eax, [ebp - 4]
push eax
call fcn.00539c60
cmp byte [ebp + 0xf], 0
pop ecx
mov edi, eax
jne 0x59c46b
xor edi, edi
lea eax, [ebp - 4]
push eax
call fcn.00539c60
pop ecx
push dword [ebp + 0x14]
mov ecx, dword [esi + 0x78]
push dword [ebp + 0x10]
mov eax, dword [ecx + eax*4]
push dword [ebp - 0x24]
mov ecx, ebx
push dword [ebp - 0x28]
mov dword [ebp - 0x1c], eax
call fcn.0059bd59
test edi, edi
je 0x59c501
dec edi
test eax, eax
jne 0x59c50a
push edi
mov ecx, ebx
call fcn.00542b40
test eax, eax
je 0x59c50a
push edi
mov ecx, ebx
call fcn.00542b40
cmp eax, dword [ebp - 0x1c]
je 0x59c50a
mov eax, dword [ebp + 0x14]
mov eax, dword [eax + 0x44]
mov eax, dword [eax + 0x54]
test eax, eax
jne 0x59c4ca
mov ecx, dword [ebp + 0x14]
push 0x15
call fcn.00581d1f
mov ecx, dword [esi + 4]
mov dword [ebp - 0x28], eax
xor eax, eax
push eax
push eax
push eax
push eax
lea eax, [edi + 1]
push eax
call fcn.00583717
push eax
push edi
mov ecx, ebx
call fcn.00542b40
mov ecx, dword [esi + 4]
push eax
call fcn.00583732
mov ecx, dword [ebp - 0x28]
push eax
push 0x431
call fcn.00583009
jmp 0x59c50a
test eax, eax
je 0x59c52d
mov edi, eax
shr edi, 3
mov ecx, ebx
push dword [ebp - 0x1c]
push edi
call fcn.0059cb5f
test byte [ebp + 0x10], 0x40
je 0x59c68d
mov eax, dword [ebx + 0x40]
add eax, edi
push dword [ebp - 4]
push eax
jmp 0x59c65c
mov edi, dword [ebp - 0x14]
cmp edi, dword [ebx + 0x3c]
jb 0x59c559
mov ecx, dword [esi + 4]
push 0x5e8418
push ebx
push str.count_is_off_on_traits
add ecx, 0x18
call fcn.00591079
mov ecx, eax
call fcn.00591126
mov ecx, eax
call fcn.00591079
push edi
mov ecx, ebx
call fcn.00542b40
test eax, eax
je 0x59c5ab
mov ecx, dword [ebp + 0x14]
mov eax, dword [ecx + 0x44]
mov eax, dword [eax + 0x54]
test eax, eax
jne 0x59c579
push 0x15
call fcn.00581d1f
mov ecx, dword [esi + 4]
mov dword [ebp - 0x28], eax
xor eax, eax
push eax
push eax
push eax
push eax
push edi
call fcn.00583717
push eax
push edi
mov ecx, ebx
call fcn.00542b40
mov ecx, dword [esi + 4]
push eax
call fcn.00583732
mov ecx, dword [ebp - 0x28]
push eax
push 0x431
call fcn.00583009
push dword [ebp - 0x1c]
mov ecx, ebx
push edi
call fcn.0059cb5f
test byte [ebp + 0x10], 0x40
je 0x59c5cc
mov eax, dword [ebx + 0x40]
push dword [ebp - 4]
add eax, edi
push eax
mov ecx, ebx
call fcn.0059a9c6
inc edi
mov dword [ebp - 0x14], edi
jmp 0x59c663
dec dword [ebp - 0xc]
push edi
push dword [ebp + 0x14]
lea eax, [ebp - 4]
push eax
mov ecx, esi
call fcn.0059bc45
mov dword [ebp - 0x28], eax
lea eax, [ebp - 4]
push eax
call fcn.00539c60
cmp eax, edi
pop ecx
je 0x59c601
mov ecx, dword [ebp - 4]
movzx edi, byte [ecx]
inc dword [ebp - 4]
mov ecx, dword [esi + 4]
mov edx, dword [ebp - 0x28]
cmp edx, dword [ecx + 0x68]
jne 0x59c624
mov edx, dword [ebp - 8]
test dl, 7
je 0x59c61a
mov dword [ebp - 0x10], edx
add edx, 4
mov ecx, edx
add edx, 8
mov dword [ebp - 8], edx
jmp 0x59c639
mov ecx, dword [ebp - 0x10]
cmp ecx, 0xffffffff
je 0x59c632
or dword [ebp - 0x10], 0xffffffff
jmp 0x59c639
mov ecx, dword [ebp - 8]
add dword [ebp - 8], 4
lea edx, [ebp - 0x54]
push edx
push edi
push ecx
push dword [ebp - 0x28]
mov ecx, ebx
push dword [ebp + 0x14]
push dword [ebp - 0xc]
push eax
call fcn.0059ae46
test byte [ebp + 0x10], 0x40
je 0x59c68d
push dword [ebp - 4]
push dword [ebp - 0xc]
mov ecx, ebx
call fcn.0059a9c6
test byte [ebp + 0x10], 0x40
je 0x59c68d
lea eax, [ebp - 4]
push eax
call fcn.00539c60
xor edi, edi
cmp eax, edi
pop ecx
jle 0x59c68f
mov dword [ebp + 0x10], eax
lea eax, [ebp - 4]
push eax
call fcn.00539c60
dec dword [ebp + 0x10]
pop ecx
jne 0x59c67c
jmp 0x59c68f
xor edi, edi
inc dword [ebp - 0x2c]
mov eax, dword [ebp - 0x2c]
cmp eax, dword [ebp - 0x30]
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x38], edi
jl 0x59c0d4
mov eax, dword [ebx + 0x30]
cmp eax, edi
je 0x59c6b9
mov ecx, dword [ebx + 0x40]
lea eax, [eax + ecx*4]
mov dword [ebp + 0xc], eax
jmp 0x59c6bc
mov dword [ebp + 0xc], edi
mov ecx, dword [ebx + 0x40]
xor eax, eax
cmp ecx, edi
mov dword [ebp + 8], eax
mov dword [ebp + 0x10], ecx
jbe 0x59c709
mov ecx, dword [ebp + 0xc]
cmp dword [ecx + eax*4], edi
jne 0x59c6fd
mov eax, dword [ebp - 0x10]
cmp eax, 0xffffffff
je 0x59c6e1
or dword [ebp - 0x10], 0xffffffff
jmp 0x59c6e8
mov eax, dword [ebp - 8]
add dword [ebp - 8], 4
lea ecx, [ebp - 0x54]
push ecx
push edi
push eax
push edi
push dword [ebp + 0x14]
mov ecx, ebx
push dword [ebp + 8]
push edi
call fcn.0059ae46
mov eax, dword [ebp + 8]
inc eax
cmp eax, dword [ebp + 0x10]
mov dword [ebp + 8], eax
jb 0x59c6cb
mov eax, dword [ebp - 0x50]
cmp eax, edi
jbe 0x59c8fe
add eax, 0x10
push eax
mov eax, dword [esi + 4]
push dword [eax + 0x28]
lea ecx, [ebp - 0x44]
call fcn.0059cc5c
mov eax, dword [ebx + 0x28]
cmp eax, edi
je 0x59c7ed
mov dword [ebp + 0xc], eax
mov eax, dword [eax + 0x34]
cmp eax, edi
mov dword [ebp + 8], eax
jne 0x59c764
mov ecx, dword [ebp + 0x14]
mov eax, dword [ecx + 0x44]
mov eax, dword [eax + 0x54]
cmp eax, edi
jne 0x59c752
push 0x15
call fcn.00581d1f
push edi
push edi
push edi
push edi
push edi
push edi
push 0x453
mov ecx, eax
call fcn.00583009
lea eax, [ebp + 8]
push eax
call fcn.00539c60
cmp eax, 1
pop ecx
jg 0x59c776
push 2
pop eax
push eax
lea ecx, [ebp - 0x44]
call fcn.005b5be5
lea eax, [ebp + 8]
push eax
call fcn.00539c60
pop ecx
push eax
lea ecx, [ebp - 0x44]
call fcn.005b5be5
lea eax, [ebp + 8]
push eax
call fcn.00539c60
pop ecx
push eax
lea ecx, [ebp - 0x44]
call fcn.005b5be5
lea eax, [ebp + 8]
push eax
call fcn.00539c60
pop ecx
push eax
lea ecx, [ebp - 0x44]
call fcn.005b5be5
lea eax, [ebp + 8]
push eax
call fcn.00539c60
mov esi, dword [ebp + 8]
cmp byte [esi], 0x49
pop ecx
mov dword [ebp + 0x14], eax
jne 0x59c7dc
push 0x49
push edi
lea ecx, [ebp - 0x54]
call fcn.0059ccf1
inc esi
dec dword [ebp + 0x14]
push dword [ebp + 0x14]
lea ecx, [ebp - 0x54]
push esi
call fcn.0059cd30
jmp 0x59c891
mov eax, dword [esi + 4]
push edi
push dword [eax + 0x28]
push 0x3c
call fcn.00440ed0
add esp, 0xc
cmp eax, edi
je 0x59c80d
mov ecx, eax
call fcn.005b5d8b
mov edi, eax
jmp 0x59c80f
xor edi, edi
push ebx
mov ecx, edi
mov dword [ebp + 0xc], edi
call fcn.0043ae30
push esi
lea ecx, [edi + 8]
call fcn.005a98bb
and dword [edi + 0xc], 0
push 1
mov ecx, edi
mov dword [edi + 0x14], 4
call fcn.005a98e6
push ebx
push 0
mov ecx, edi
call fcn.005a9a71
mov eax, dword [esi + 4]
push dword [eax + 0x84]
lea ecx, [edi + 0x28]
call fcn.0043ae30
push edi
lea ecx, [ebx + 0x28]
call fcn.005a98bb
or byte [edi + 0x1b], 0x20
push 2
lea ecx, [ebp - 0x44]
call fcn.005b5be5
push 1
lea ecx, [ebp - 0x44]
call fcn.005b5be5
push 1
lea ecx, [ebp - 0x44]
call fcn.005b5be5
push 1
lea ecx, [ebp - 0x44]
call fcn.005b5be5
push 0x47
lea ecx, [ebp - 0x54]
call fcn.0059b4e7
push dword [ebp - 0x50]
lea ecx, [ebp - 0x44]
call fcn.005b5be5
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp - 0x44]
call fcn.0059cc2a
push 0
lea ecx, [ebp - 0x44]
call fcn.005b5be5
mov eax, dword [ebp - 0x34]
mov eax, dword [eax + 4]
mov ecx, dword [eax + 0x28]
push 3
push 0
push dword [ebp - 0x40]
call fcn.005be0e0
mov ecx, dword [ebp - 0x40]
mov esi, dword [ebp - 0x44]
mov edx, ecx
shr ecx, 2
mov edi, eax
rep movsd dword es:[edi], dword [esi]
push eax
mov eax, dword [ebp + 0xc]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [eax + 0x34]
push ecx
push eax
mov eax, dword [ebp - 0x34]
mov eax, dword [eax + 4]
mov ecx, dword [eax + 0x28]
call fcn.00451a20
lea ecx, [ebp - 0x44]
call fcn.0059cc98
xor edi, edi
mov ecx, dword [ebx + 0x14]
cmp ecx, edi
je 0x59c91a
cmp dword [ecx + 0x14], edi
je 0x59c91a
mov eax, dword [ecx + 0x4c]
cmp eax, 0xffffffff
je 0x59c91a
sub eax, dword [ecx + 0x50]
add eax, dword [ebx + 0x50]
jmp 0x59c927
test byte [ebx + 0x20], 1
je 0x59c92a
mov eax, dword [ebp - 8]
add dword [ebp - 8], 0x10
mov dword [ebx + 0x4c], eax
mov eax, dword [ebp - 8]
lea ecx, [ebp - 0x54]
mov dword [ebx + 0x2c], eax
call fcn.0059cc98
pop edi
pop esi
pop ebx
leave
ret 0x10