Function at 0x59b9f1
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 0x59ba23
cmp dword [eax + 0x14], edi
je 0x59ba23
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.005390d0
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.0059c652
lea eax, [ebp + 0xf]
push eax
lea eax, [ebp + 0xb]
push eax
push ebx
mov ecx, esi
call fcn.0059b155
cmp dword [ebp - 0x30], edi
mov dword [ebp - 0x2c], edi
jle 0x59c046
lea ecx, [ebp - 0x40]
call fcn.005929c7
push dword [ebp + 0x14]
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 4]
push eax
mov ecx, esi
call fcn.0059b529
mov eax, dword [ebp - 0x3c]
push edi
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x24], eax
call fcn.005929d4
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 0x59badf
cmp eax, 1
je 0x59bdf6
jle 0x59c002
cmp eax, 3
jle 0x59bc78
cmp eax, 4
je 0x59bb76
cmp eax, 5
je 0x59bb0c
cmp eax, 6
jne 0x59c002
lea eax, [ebp - 4]
push eax
call fcn.005390d0
cmp byte [ebp + 0xb], 0
pop ecx
mov dword [ebp - 0xc], eax
jne 0x59baf5
mov dword [ebp - 0xc], edi
cmp dword [ebp - 0xc], edi
jne 0x59bf74
mov eax, dword [ebp - 0x18]
inc dword [ebp - 0x18]
mov dword [ebp - 0xc], eax
jmp 0x59bf77
lea eax, [ebp - 4]
push eax
call fcn.005390d0
cmp byte [ebp + 0xb], 0
pop ecx
mov dword [ebp - 0xc], eax
jne 0x59bb22
mov dword [ebp - 0xc], edi
cmp dword [ebp - 0xc], edi
jne 0x59bb32
mov eax, dword [ebp - 0x18]
inc dword [ebp - 0x18]
mov dword [ebp - 0xc], eax
jmp 0x59bb35
dec dword [ebp - 0xc]
lea eax, [ebp - 4]
push eax
call fcn.005390d0
cmp dword [ebp - 0x10], 0xffffffff
pop ecx
mov ecx, dword [esi + 0x78]
mov eax, dword [ecx + eax*4]
je 0x59bb54
mov ecx, dword [ebp - 0x10]
or dword [ebp - 0x10], 0xffffffff
jmp 0x59bb5b
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.0059a7e5
jmp 0x59bd4c
lea eax, [ebp - 4]
push eax
call fcn.005390d0
cmp byte [ebp + 0xb], 0
pop ecx
mov dword [ebp - 0xc], eax
jne 0x59bb8c
mov dword [ebp - 0xc], edi
cmp dword [ebp - 0xc], edi
jne 0x59bb9c
mov eax, dword [ebp - 0x18]
inc dword [ebp - 0x18]
mov dword [ebp - 0xc], eax
jmp 0x59bb9f
dec dword [ebp - 0xc]
lea eax, [ebp - 4]
push eax
call fcn.005390d0
cmp eax, dword [esi + 0xe4]
pop ecx
mov dword [ebp - 0x1c], eax
jb 0x59bbfa
mov eax, dword [ebp + 0x14]
mov eax, dword [eax + 0x44]
mov eax, dword [eax + 0x54]
cmp eax, edi
jne 0x59bbcb
mov ecx, dword [ebp + 0x14]
push 0x15
call fcn.0058171f
mov ecx, dword [esi + 4]
push edi
push edi
push edi
push edi
push dword [esi + 0xe4]
mov dword [ebp - 0x28], eax
call fcn.00583117
mov ecx, dword [esi + 4]
push eax
push dword [ebp - 0x1c]
call fcn.00583117
mov ecx, dword [ebp - 0x28]
push eax
push 0x424
call fcn.00582a09
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 0x59bc45
mov eax, dword [ebp + 0x14]
mov eax, dword [eax + 0x44]
mov eax, dword [eax + 0x54]
cmp eax, edi
jne 0x59bc24
mov ecx, dword [ebp + 0x14]
push 0x15
call fcn.0058171f
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.00583117
mov ecx, dword [ebp - 0x28]
push eax
push 0x423
call fcn.00582a09
mov eax, dword [ebp - 0x10]
cmp eax, 0xffffffff
je 0x59bc53
or dword [ebp - 0x10], 0xffffffff
jmp 0x59bc5a
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.0059a7e5
jmp 0x59c002
lea eax, [ebp - 4]
push eax
call fcn.005390d0
cmp byte [ebp + 0xf], 0
pop ecx
mov dword [ebp - 0xc], eax
jne 0x59bc8e
mov dword [ebp - 0xc], edi
lea eax, [ebp - 4]
push eax
call fcn.005390d0
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.0059b6f8
push dword [ebp - 0x28]
mov ecx, ebx
push dword [ebp - 0x24]
mov dword [ebp - 0x20], eax
call fcn.00599d93
cmp dword [ebp - 0xc], edi
jbe 0x59bd61
dec dword [ebp - 0xc]
cmp dword [ebp - 0x20], edi
jne 0x59bd3f
push dword [ebp - 0xc]
mov ecx, ebx
call fcn.00542070
test eax, eax
je 0x59bd3f
push dword [ebp - 0xc]
mov ecx, ebx
call fcn.00542070
cmp eax, dword [ebp - 0x1c]
je 0x59bd3f
mov eax, dword [ebp + 0x14]
mov eax, dword [eax + 0x44]
mov eax, dword [eax + 0x54]
cmp eax, edi
jne 0x59bd09
mov ecx, dword [ebp + 0x14]
push 0x15
call fcn.0058171f
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.00583117
push eax
push dword [ebp - 0xc]
mov ecx, ebx
call fcn.00542070
mov ecx, dword [esi + 4]
push eax
call fcn.00583132
mov ecx, dword [ebp - 0x28]
push eax
push 0x431
call fcn.00582a09
push dword [ebp - 0x1c]
mov ecx, ebx
push dword [ebp - 0xc]
call fcn.0059c538
test byte [ebp + 0x10], 0x40
je 0x59c02c
mov eax, dword [ebx + 0x40]
add eax, dword [ebp - 0xc]
jmp 0x59bec3
cmp dword [ebp - 0x20], edi
mov ecx, ebx
je 0x59bd73
mov edi, dword [ebp - 0x20]
shr edi, 3
jmp 0x59beab
push dword [ebp - 0x14]
call fcn.00542070
test eax, eax
je 0x59bdca
mov eax, dword [ebp + 0x14]
mov eax, dword [eax + 0x44]
mov eax, dword [eax + 0x54]
cmp eax, edi
jne 0x59bd96
mov ecx, dword [ebp + 0x14]
push 0x15
call fcn.0058171f
mov ecx, dword [esi + 4]
push edi
push edi
push edi
push edi
push dword [ebp - 0x14]
mov dword [ebp - 0x28], eax
call fcn.00583117
push eax
push dword [ebp - 0x14]
mov ecx, ebx
call fcn.00542070
mov ecx, dword [esi + 4]
push eax
call fcn.00583132
mov ecx, dword [ebp - 0x28]
push eax
push 0x431
call fcn.00582a09
push dword [ebp - 0x1c]
mov ecx, ebx
push dword [ebp - 0x14]
call fcn.0059c538
test byte [ebp + 0x10], 0x40
je 0x59bdee
mov eax, dword [ebx + 0x40]
push dword [ebp - 4]
add eax, dword [ebp - 0x14]
mov ecx, ebx
push eax
call fcn.0059a365
inc dword [ebp - 0x14]
jmp 0x59c002
lea eax, [ebp - 4]
push eax
call fcn.005390d0
cmp byte [ebp + 0xf], 0
pop ecx
mov edi, eax
jne 0x59be0a
xor edi, edi
lea eax, [ebp - 4]
push eax
call fcn.005390d0
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.0059b6f8
test edi, edi
je 0x59bea0
dec edi
test eax, eax
jne 0x59bea9
push edi
mov ecx, ebx
call fcn.00542070
test eax, eax
je 0x59bea9
push edi
mov ecx, ebx
call fcn.00542070
cmp eax, dword [ebp - 0x1c]
je 0x59bea9
mov eax, dword [ebp + 0x14]
mov eax, dword [eax + 0x44]
mov eax, dword [eax + 0x54]
test eax, eax
jne 0x59be69
mov ecx, dword [ebp + 0x14]
push 0x15
call fcn.0058171f
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.00583117
push eax
push edi
mov ecx, ebx
call fcn.00542070
mov ecx, dword [esi + 4]
push eax
call fcn.00583132
mov ecx, dword [ebp - 0x28]
push eax
push 0x431
call fcn.00582a09
jmp 0x59bea9
test eax, eax
je 0x59becc
mov edi, eax
shr edi, 3
mov ecx, ebx
push dword [ebp - 0x1c]
push edi
call fcn.0059c538
test byte [ebp + 0x10], 0x40
je 0x59c02c
mov eax, dword [ebx + 0x40]
add eax, edi
push dword [ebp - 4]
push eax
jmp 0x59bffb
mov edi, dword [ebp - 0x14]
cmp edi, dword [ebx + 0x3c]
jb 0x59bef8
mov ecx, dword [esi + 4]
push 0x5e8320
push ebx
push str.count_is_off_on_traits
add ecx, 0x18
call fcn.005909dd
mov ecx, eax
call fcn.00590a8a
mov ecx, eax
call fcn.005909dd
push edi
mov ecx, ebx
call fcn.00542070
test eax, eax
je 0x59bf4a
mov ecx, dword [ebp + 0x14]
mov eax, dword [ecx + 0x44]
mov eax, dword [eax + 0x54]
test eax, eax
jne 0x59bf18
push 0x15
call fcn.0058171f
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.00583117
push eax
push edi
mov ecx, ebx
call fcn.00542070
mov ecx, dword [esi + 4]
push eax
call fcn.00583132
mov ecx, dword [ebp - 0x28]
push eax
push 0x431
call fcn.00582a09
push dword [ebp - 0x1c]
mov ecx, ebx
push edi
call fcn.0059c538
test byte [ebp + 0x10], 0x40
je 0x59bf6b
mov eax, dword [ebx + 0x40]
push dword [ebp - 4]
add eax, edi
push eax
mov ecx, ebx
call fcn.0059a365
inc edi
mov dword [ebp - 0x14], edi
jmp 0x59c002
dec dword [ebp - 0xc]
push edi
push dword [ebp + 0x14]
lea eax, [ebp - 4]
push eax
mov ecx, esi
call fcn.0059b5e4
mov dword [ebp - 0x28], eax
lea eax, [ebp - 4]
push eax
call fcn.005390d0
cmp eax, edi
pop ecx
je 0x59bfa0
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 0x59bfc3
mov edx, dword [ebp - 8]
test dl, 7
je 0x59bfb9
mov dword [ebp - 0x10], edx
add edx, 4
mov ecx, edx
add edx, 8
mov dword [ebp - 8], edx
jmp 0x59bfd8
mov ecx, dword [ebp - 0x10]
cmp ecx, 0xffffffff
je 0x59bfd1
or dword [ebp - 0x10], 0xffffffff
jmp 0x59bfd8
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.0059a7e5
test byte [ebp + 0x10], 0x40
je 0x59c02c
push dword [ebp - 4]
push dword [ebp - 0xc]
mov ecx, ebx
call fcn.0059a365
test byte [ebp + 0x10], 0x40
je 0x59c02c
lea eax, [ebp - 4]
push eax
call fcn.005390d0
xor edi, edi
cmp eax, edi
pop ecx
jle 0x59c02e
mov dword [ebp + 0x10], eax
lea eax, [ebp - 4]
push eax
call fcn.005390d0
dec dword [ebp + 0x10]
pop ecx
jne 0x59c01b
jmp 0x59c02e
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 0x59ba73
mov eax, dword [ebx + 0x30]
cmp eax, edi
je 0x59c058
mov ecx, dword [ebx + 0x40]
lea eax, [eax + ecx*4]
mov dword [ebp + 0xc], eax
jmp 0x59c05b
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 0x59c0a8
mov ecx, dword [ebp + 0xc]
cmp dword [ecx + eax*4], edi
jne 0x59c09c
mov eax, dword [ebp - 0x10]
cmp eax, 0xffffffff
je 0x59c080
or dword [ebp - 0x10], 0xffffffff
jmp 0x59c087
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.0059a7e5
mov eax, dword [ebp + 8]
inc eax
cmp eax, dword [ebp + 0x10]
mov dword [ebp + 8], eax
jb 0x59c06a
mov eax, dword [ebp - 0x50]
cmp eax, edi
jbe 0x59c29d
add eax, 0x10
push eax
mov eax, dword [esi + 4]
push dword [eax + 0x28]
lea ecx, [ebp - 0x44]
call fcn.0059c652
mov eax, dword [ebx + 0x28]
cmp eax, edi
je 0x59c18c
mov dword [ebp + 0xc], eax
mov eax, dword [eax + 0x34]
cmp eax, edi
mov dword [ebp + 8], eax
jne 0x59c103
mov ecx, dword [ebp + 0x14]
mov eax, dword [ecx + 0x44]
mov eax, dword [eax + 0x54]
cmp eax, edi
jne 0x59c0f1
push 0x15
call fcn.0058171f
push edi
push edi
push edi
push edi
push edi
push edi
push 0x453
mov ecx, eax
call fcn.00582a09
lea eax, [ebp + 8]
push eax
call fcn.005390d0
cmp eax, 1
pop ecx
jg 0x59c115
push 2
pop eax
push eax
lea ecx, [ebp - 0x44]
call fcn.005b5531
lea eax, [ebp + 8]
push eax
call fcn.005390d0
pop ecx
push eax
lea ecx, [ebp - 0x44]
call fcn.005b5531
lea eax, [ebp + 8]
push eax
call fcn.005390d0
pop ecx
push eax
lea ecx, [ebp - 0x44]
call fcn.005b5531
lea eax, [ebp + 8]
push eax
call fcn.005390d0
pop ecx
push eax
lea ecx, [ebp - 0x44]
call fcn.005b5531
lea eax, [ebp + 8]
push eax
call fcn.005390d0
mov esi, dword [ebp + 8]
cmp byte [esi], 0x49
pop ecx
mov dword [ebp + 0x14], eax
jne 0x59c17b
push 0x49
push edi
lea ecx, [ebp - 0x54]
call fcn.0059c6c9
inc esi
dec dword [ebp + 0x14]
push dword [ebp + 0x14]
lea ecx, [ebp - 0x54]
push esi
call fcn.0059c708
jmp 0x59c230
mov eax, dword [esi + 4]
push edi
push dword [eax + 0x28]
push 0x3c
call fcn.00440f60
add esp, 0xc
cmp eax, edi
je 0x59c1ac
mov ecx, eax
call fcn.005b56d7
mov edi, eax
jmp 0x59c1ae
xor edi, edi
push ebx
mov ecx, edi
mov dword [ebp + 0xc], edi
call fcn.00475970
push esi
lea ecx, [edi + 8]
call fcn.0059c2de
and dword [edi + 0xc], 0
push 1
mov ecx, edi
mov dword [edi + 0x14], 4
call fcn.005a924a
push ebx
push 0
mov ecx, edi
call fcn.005a93d5
mov eax, dword [esi + 4]
push dword [eax + 0x84]
lea ecx, [edi + 0x28]
call fcn.00475970
push edi
lea ecx, [ebx + 0x28]
call fcn.0059c2de
or byte [edi + 0x1b], 0x20
push 2
lea ecx, [ebp - 0x44]
call fcn.005b5531
push 1
lea ecx, [ebp - 0x44]
call fcn.005b5531
push 1
lea ecx, [ebp - 0x44]
call fcn.005b5531
push 1
lea ecx, [ebp - 0x44]
call fcn.005b5531
push 0x47
lea ecx, [ebp - 0x54]
call fcn.0059ae86
push dword [ebp - 0x50]
lea ecx, [ebp - 0x44]
call fcn.005b5531
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp - 0x44]
call fcn.0059c620
push 0
lea ecx, [ebp - 0x44]
call fcn.005b5531
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.005bdaa0
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.00451a80
lea ecx, [ebp - 0x44]
call fcn.005b45f0
xor edi, edi
mov ecx, dword [ebx + 0x14]
cmp ecx, edi
je 0x59c2b9
cmp dword [ecx + 0x14], edi
je 0x59c2b9
mov eax, dword [ecx + 0x4c]
cmp eax, 0xffffffff
je 0x59c2b9
sub eax, dword [ecx + 0x50]
add eax, dword [ebx + 0x50]
jmp 0x59c2c6
test byte [ebx + 0x20], 1
je 0x59c2c9
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.005b45f0
pop edi
pop esi
pop ebx
leave
ret 0x10