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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x2c
mov ebx, edx
mov dword [ebp - 0x18], ecx
mov esi, dword [ebp + 0xc]
mov eax, dword [0x808040]
xor eax, ebp
mov dword [ebp - 0x10], eax
lea edx, [esi + 8]
mov eax, dword [esi + 0x274]
test eax, eax
mov dword [ebp - 0x1c], ebx
jne 0x59e3e8
mov ecx, esi
mov edi, edx
push ebx
call fcn.00512ec0
add esp, 4
cmp eax, 1
jne 0x59e3d7
inc dword [ebx]
mov dword [esi + 0x974], 0
mov ecx, dword [esi + 0x18]
mov esi, dword [esi + 0x20]
call dword [0x8010bc]
push dword [ebp - 0x18]
push esi
call ecx
add esp, 8
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
test eax, eax
je 0x59e3de
cmp dword [ebx], 1
jbe 0x59e294
mov ebx, edi
mov edi, dword [ebp + 0xc]
mov dword [edi + 0x274], 1
mov esi, dword [ebp - 0x18]
mov ecx, dword [edi + 0xc]
lea eax, [ecx - 0x1c]
cmp eax, 5
mov dword [ebp - 0x20], ebx
jb 0x59e2f3
mov edx, dword [ebx]
shr edx, cl
mov eax, edx
and eax, 1
lea ecx, [ecx + eax*4]
inc ecx
neg eax
shr edx, 1
and edx, 0xf
inc edx
and edx, eax
mov dword [edi + 0x978], edx
mov dword [edi + 0xc], ecx
mov dword [edi + 0x274], 2
mov eax, dword [ebp - 0x1c]
add edx, dword [eax]
lea eax, [edi + 0x980]
mov ecx, edx
push edi
push 0
push eax
call fcn.0059d4d0
add esp, 0xc
cmp eax, 1
jne 0x59e3d7
mov dword [edi + 0x97c], 0xffff
mov dword [edi + 0x274], 3
mov ebx, 0xffff
mov edx, dword [edi + 0x974]
mov eax, dword [edi + 0x978]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x14], ebx
cmp ebx, 0xffff
setne cl
mov dword [ebp - 0x1c], edx
cmp edx, esi
setb al
or al, cl
cmp al, 1
jne 0x59e2a7
lea eax, [edi + 0x980]
mov dword [ebp - 0x30], eax
jmp 0x59e22c
add eax, 8
movzx edi, word [ecx + 2]
shr edx, 8
and edx, dword [ebx*4 + 0x7a3e80]
and edx, 0x7f
lea ecx, [ecx + edx*4]
lea ecx, [ecx + edi*4]
mov edi, dword [ebp + 0xc]
mov bl, byte [ecx]
jmp 0x59e1f8
mov eax, dword [edi + 0xc]
mov ecx, 0x20
sub ecx, eax
cmp ecx, ebx
jb 0x59e354
mov ecx, dword [ebp - 0x20]
mov edi, dword [ecx]
mov ecx, eax
shr edi, cl
and edi, dword [ebx*4 + 0x7a3ea0]
add eax, ebx
xor edx, edx
inc edx
mov ecx, ebx
shl edx, cl
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0xc], eax
add edx, edi
mov eax, dword [ebp - 0x1c]
lea edi, [edx + eax]
cmp edi, esi
ja 0x59e329
add eax, dword [ebp - 0x28]
push edx
push 0
push eax
call fcn.005c9b00
add esp, 0xc
jmp 0x59e220
mov eax, dword [ebp - 0x28]
mov edi, dword [ebp - 0x1c]
mov byte [eax + edi], 0
inc edi
xor ebx, ebx
jmp 0x59e220
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx]
mov ecx, eax
shr edx, cl
movzx ecx, dl
mov ebx, dword [ebp - 0x30]
lea ecx, [ebx + ecx*4]
movzx ebx, byte [ecx]
cmp ebx, 9
jae 0x59e158
movzx edx, bl
add edx, eax
mov dword [edi + 0xc], edx
movzx ebx, word [ecx + 2]
mov dword [ebp - 0x14], ebx
test ebx, ebx
je 0x59e1cb
mov eax, ebx
sub eax, dword [ebp - 0x38]
jbe 0x59e179
mov ecx, dword [ebp - 0x28]
mov edi, dword [ebp - 0x1c]
mov byte [ecx + edi], al
inc edi
xor ecx, ecx
mov dword [ebp - 0x1c], edi
cmp edi, esi
mov edi, dword [ebp + 0xc]
jae 0x59e2a7
mov eax, dword [edi + 0xc]
test cl, 1
jne 0x59e17c
lea ecx, [eax - 0x12]
cmp ecx, 0xf
jae 0x59e1da
mov ecx, dword [edi + 0x14]
dec ecx
mov ebx, eax
cmp ecx, 0xffffffff
je 0x59e330
mov eax, dword [edi + 8]
mov edx, dword [ebp + 0xc]
mov edi, dword [edx + 0x10]
mov edx, eax
shr edx, 8
mov esi, dword [ebp + 0xc]
mov dword [esi + 8], edx
movzx edx, byte [edi]
shld edx, eax, 0x18
mov eax, dword [ebp + 0xc]
mov dword [eax + 8], edx
lea eax, [ebx - 8]
mov dword [esi + 0xc], eax
mov dword [esi + 0x14], ecx
inc edi
mov dword [esi + 0x10], edi
mov edi, dword [ebp + 0xc]
dec ecx
add ebx, 0xffffffe6
cmp ebx, 0xf
mov ebx, eax
mov esi, dword [ebp - 0x18]
jae 0x59e1df
jmp 0x59e246
push dword [ebp - 0x18]
push 0
push eax
call fcn.005c9b00
add esp, 0xc
xor ebx, ebx
inc ebx
jmp case.default.0x59e403
mov ebx, dword [ebp - 0x20]
mov ecx, dword [edi + 0xc]
cmp ecx, 0x20
je 0x59e42f
mov eax, dword [ebx]
lea edx, [ecx + 1]
mov dword [edi + 0xc], edx
xor ebx, ebx
inc ebx
xor esi, esi
bt eax, ecx
jae 0x59e2d9
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x18]
push edi
call fcn.0059f240
add esp, 4
mov dword [edi + 0x274], esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005c6b46
mov eax, ebx
add esp, 0x2c
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [edi + 0x14]
test eax, eax
je 0x59e3cd
mov ebx, dword [edi + 8]
mov esi, dword [edi + 0x10]
mov edx, ebx
shr edx, 8
mov dword [edi + 8], edx
movzx edx, byte [esi]
shld edx, ebx, 0x18
mov dword [edi + 8], edx
dec eax
mov dword [edi + 0x14], eax
inc esi
mov dword [edi + 0x10], esi
add ecx, 0xfffffff8
mov esi, dword [ebp - 0x18]
jmp 0x59e0b2
mov ebx, 0xfffffff8
jmp case.default.0x59e403
lea eax, [ebp - 0x14]
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x20]
push eax
call fcn.00513f80
add esp, 4
test eax, eax
je 0x59e3b6
mov ebx, dword [ebp - 0x14]
mov edi, dword [ebp + 0xc]
mov esi, dword [ebp - 0x18]
jmp 0x59e207
mov edx, dword [ebp + 0xc]
mov edx, dword [edx + 0x14]
dec edx
mov dword [ebp - 0x24], edx
cmp dword [ebp - 0x24], 0xffffffff
je 0x59e3bb
mov edx, dword [ebp + 0xc]
mov esi, dword [edx + 8]
mov dword [ebp - 0x34], esi
mov edx, dword [edx + 0x10]
mov dword [ebp - 0x2c], edx
mov edi, esi
shr edi, 8
mov esi, dword [ebp + 0xc]
mov dword [esi + 8], edi
movzx edi, byte [edx]
mov esi, dword [ebp - 0x34]
shld edi, esi, 0x18
mov edx, dword [ebp + 0xc]
mov dword [edx + 8], edi
add eax, 0xfffffff8
mov dword [edx + 0xc], eax
mov esi, dword [ebp - 0x24]
mov dword [edx + 0x14], esi
inc dword [ebp - 0x2c]
mov esi, dword [ebp - 0x2c]
mov dword [edx + 0x10], esi
dec dword [ebp - 0x24]
add ecx, 8
cmp ecx, ebx
mov esi, dword [ebp - 0x18]
jae 0x59e190
jmp 0x59e35e
mov ebx, 0xffff
mov eax, dword [ebp + 0xc]
mov dword [eax + 0x97c], ebx
mov ecx, dword [ebp - 0x1c]
mov dword [eax + 0x974], ecx
mov ebx, 2
jmp case.default.0x59e403
mov ebx, eax
jmp case.default.0x59e403
mov ebx, 0xffffffe7
jmp case.default.0x59e403
mov dword [ebp - 0x20], edx
mov ebx, 0xffffffe1
dec eax
cmp eax, 3
ja case.default.0x59e403
mov edi, dword [ebp + 0xc]
mov esi, dword [ebp - 0x18]
mov ebx, dword [ebp - 0x20]
jmp dword [eax*4 + 0x7a0b84]
mov edx, dword [edi + 0x978]
jmp 0x59e0da
mov ebx, dword [edi + 0x97c]
jmp 0x59e115
mov ebx, 2
mov esi, 4
jmp 0x59e2d9
mov ecx, dword [edi + 0x14]
test ecx, ecx
je 0x59e420
mov esi, dword [edi + 8]
mov edx, dword [edi + 0x10]
mov eax, esi
shr eax, 8
mov dword [edi + 8], eax
movzx eax, byte [edx]
shld eax, esi, 0x18
mov dword [edi + 8], eax
dec ecx
mov dword [edi + 0x14], ecx
inc edx
mov dword [edi + 0x10], edx
mov ecx, 0x18
jmp 0x59e2b8