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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x74
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, eax
mov dword [esi + 0x3c], 2
mov eax, dword [ebx + 4]
cmp eax, dword [esi + 4]
push edi
jne 0x59bb08
mov ecx, dword [ebx + 8]
cmp ecx, dword [esi + 8]
je 0x59bb13
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp dword [ebx], 4
jne 0x59bb08
mov eax, dword [esi]
cmp eax, 8
je 0x59bb24
cmp eax, 9
jne 0x59bb08
push 0
mov eax, ebx
lea edi, [esp + 0x44]
call fcn.004d3900
push 0
push esi
lea ecx, [esp + 0x58]
call fcn.004d39b0
push 0
lea edi, [esp + 0x64]
call fcn.004d3a60
push 0
lea edi, [esp + 0x74]
call fcn.004d3b00
mov eax, dword [ebx + 8]
cmp eax, 2
mov ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x58]
mov edi, dword [esp + 0x68]
mov esi, dword [esp + 0x78]
mov dword [esp + 0x3c], eax
jl 0x59c01d
mov ebx, dword [esp + 0x4c]
test ecx, ecx
je 0x59bb08
cmp ecx, dword [esp + 0x40]
jb 0x59bb08
cmp ecx, dword [esp + 0x44]
ja 0x59bb08
test edx, edx
je 0x59bb08
cmp edx, dword [esp + 0x50]
jb 0x59bb08
cmp edx, dword [esp + 0x54]
ja 0x59bb08
test edi, edi
je 0x59bb08
cmp edi, dword [esp + 0x60]
jb 0x59bb08
cmp edi, dword [esp + 0x64]
ja 0x59bb08
test esi, esi
je 0x59bb08
cmp esi, dword [esp + 0x70]
jb 0x59bb08
cmp esi, dword [esp + 0x74]
ja 0x59bb08
mov eax, ecx
mov dword [esp + 0x24], ecx
add ecx, ebx
mov ebx, edi
mov edi, dword [ebp + 8]
mov edi, dword [edi + 4]
mov dword [esp + 0x18], edx
add edx, dword [esp + 0x5c]
cmp edi, 2
mov dword [esp + 0x48], ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x58], edx
mov dword [esp + 0x28], edx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], esi
jl 0x59be75
mov ecx, edi
shr ecx, 1
mov dword [esp + 0x38], ecx
neg ecx
lea edx, [edi + ecx*2]
mov dword [esp + 0x2c], edx
movzx eax, word [eax]
mov word [esp + 0x10], ax
mov esi, dword [esp + 0x10]
mov ecx, esi
shr ecx, 7
movzx ecx, cl
mov eax, esi
shr eax, 0xc
and eax, 7
or eax, ecx
mov edx, esi
shr edx, 2
movzx esi, dl
and ecx, 7
or ecx, esi
mov edx, ecx
mov cl, byte [esp + 0x10]
mov edi, edx
imul edx, edx, 0x275
add cl, cl
add cl, cl
add cl, cl
movzx ecx, cl
and esi, 7
or ecx, esi
mov esi, eax
imul eax, eax, 0xbb
add edx, eax
mov eax, ecx
shl eax, 6
sub eax, ecx
lea edx, [edx + eax + 0x4200]
mov eax, dword [esp + 0x18]
shr edx, 0xa
mov byte [eax], dl
mov edx, dword [esp + 0x24]
movzx eax, word [edx + 2]
mov word [esp + 0x10], ax
mov ebx, dword [esp + 0x10]
mov edx, ebx
shr edx, 7
movzx edx, dl
mov eax, ebx
shr eax, 0xc
and eax, 7
or eax, edx
and edx, 7
shr ebx, 2
movzx ebx, bl
or edx, ebx
mov dword [esp + 0x14], edx
movzx edx, byte [esp + 0x10]
add dl, dl
add dl, dl
add dl, dl
movzx edx, dl
and ebx, 7
or edx, ebx
mov ebx, dword [esp + 0x14]
add esi, eax
imul eax, eax, 0xbb
add edi, ebx
imul ebx, ebx, 0x275
add ebx, eax
mov eax, edx
shl eax, 6
sub eax, edx
add ecx, edx
lea edx, [ebx + eax + 0x4200]
mov eax, dword [esp + 0x18]
shr edx, 0xa
mov byte [eax + 1], dl
mov edx, dword [esp + 0x1c]
movzx eax, word [edx]
mov word [esp + 0x10], ax
mov ebx, dword [esp + 0x10]
mov edx, ebx
shr edx, 7
mov eax, ebx
movzx edx, dl
shr eax, 0xc
and eax, 7
or eax, edx
shr ebx, 2
and edx, 7
movzx ebx, bl
or edx, ebx
mov dword [esp + 0x14], edx
movzx edx, byte [esp + 0x10]
add dl, dl
add esi, eax
imul eax, eax, 0xbb
add dl, dl
add dl, dl
and ebx, 7
movzx edx, dl
or edx, ebx
mov ebx, dword [esp + 0x14]
add edi, ebx
imul ebx, ebx, 0x275
add ebx, eax
mov eax, edx
shl eax, 6
sub eax, edx
add ecx, edx
lea edx, [ebx + eax + 0x4200]
mov eax, dword [esp + 0x28]
shr edx, 0xa
mov byte [eax], dl
mov edx, dword [esp + 0x1c]
movzx eax, word [edx + 2]
mov word [esp + 0x10], ax
mov eax, dword [esp + 0x10]
mov edx, eax
shr eax, 0xc
and eax, 7
shr edx, 7
movzx edx, dl
or eax, edx
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x10]
shr eax, 2
movzx ebx, al
mov al, byte [esp + 0x10]
add al, al
add al, al
add al, al
movzx eax, al
and edx, 7
or edx, ebx
and ebx, 7
or eax, ebx
mov ebx, dword [esp + 0x20]
add esi, ebx
imul ebx, ebx, 0xbb
add edi, edx
imul edx, edx, 0x275
add edx, ebx
mov ebx, eax
add ecx, eax
shl ebx, 6
sub ebx, eax
lea eax, [edx + ebx + 0x4200]
mov edx, dword [esp + 0x28]
shr eax, 0xa
mov byte [edx + 1], al
mov eax, edi
imul edi, edi, 0x199
imul eax, eax, 0x15b
mov ebx, esi
imul ebx, ebx, 0xffffff99
sub ebx, eax
mov eax, ecx
imul ecx, ecx, 0xffffffd7
imul eax, eax, 0x1c2
lea eax, [ebx + eax + 0x7ff]
mov ebx, dword [esp + 0x30]
shr eax, 0xc
add al, 0x80
sub ecx, edi
imul esi, esi, 0x1c2
mov byte [ebx], al
mov eax, dword [esp + 0x24]
add dword [esp + 0x1c], 4
add dword [esp + 0x18], 2
lea ecx, [ecx + esi + 0x7ff]
mov esi, dword [esp + 0x34]
shr ecx, 0xc
add cl, 0x80
mov byte [esi], cl
add ebx, 1
add esi, 1
add eax, 4
add edx, 2
sub dword [esp + 0x38], 1
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], esi
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], edx
jne 0x59bc25
mov edi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x48]
test edi, edi
je 0x59bfe3
movzx eax, word [eax]
mov word [esp + 0x10], ax
mov eax, dword [esp + 0x10]
mov ecx, eax
shr ecx, 7
movzx edi, cl
mov ecx, dword [esp + 0x10]
shr ecx, 2
movzx ecx, cl
mov dword [esp + 0x28], ecx
shr eax, 0xc
and eax, 7
or eax, edi
and edi, 7
or edi, ecx
movzx ecx, byte [esp + 0x10]
add cl, cl
add cl, cl
add cl, cl
movzx ecx, cl
mov dword [esp + 0x14], edi
mov edi, dword [esp + 0x28]
and edi, 7
or ecx, edi
mov edi, dword [esp + 0x14]
mov dword [esp + 0x2c], eax
imul eax, eax, 0xbb
mov dword [esp + 0x24], edi
imul edi, edi, 0x275
add edi, eax
mov eax, ecx
mov dword [esp + 0x38], ecx
shl eax, 6
sub eax, ecx
lea ecx, [edi + eax + 0x4200]
mov eax, dword [esp + 0x18]
shr ecx, 0xa
mov byte [eax], cl
mov ecx, dword [esp + 0x1c]
movzx eax, word [ecx]
mov word [esp + 0x10], ax
mov eax, dword [esp + 0x10]
mov ecx, eax
shr ecx, 7
movzx edi, cl
mov ecx, dword [esp + 0x10]
shr ecx, 2
movzx ecx, cl
mov dword [esp + 0x28], ecx
shr eax, 0xc
and eax, 7
or eax, edi
add dword [esp + 0x2c], eax
imul eax, eax, 0xbb
and edi, 7
or edi, ecx
movzx ecx, byte [esp + 0x10]
add cl, cl
add cl, cl
add cl, cl
movzx ecx, cl
mov dword [esp + 0x14], edi
mov edi, dword [esp + 0x28]
and edi, 7
or ecx, edi
mov edi, dword [esp + 0x38]
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x14]
add dword [esp + 0x24], ecx
imul ecx, ecx, 0x275
add edi, dword [esp + 0x20]
add ecx, eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x38], ecx
mov ecx, eax
shl ecx, 6
sub ecx, eax
mov eax, dword [esp + 0x38]
lea ecx, [eax + ecx + 0x4200]
shr ecx, 0xa
mov byte [edx], cl
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x24]
imul edx, edx, 0x15b
mov ecx, eax
imul eax, eax, 0x1c2
imul ecx, ecx, 0xffffff99
sub ecx, edx
mov edx, edi
imul edi, edi, 0xffffffd7
imul edx, edx, 0x1c2
lea ecx, [ecx + edx + 0x3ff]
shr ecx, 0xb
add cl, 0x80
mov byte [ebx], cl
mov ecx, dword [esp + 0x24]
imul ecx, ecx, 0x199
sub edi, ecx
mov ecx, dword [esp + 0x48]
lea edx, [edi + eax + 0x3ff]
shr edx, 0xb
add dl, 0x80
mov byte [esi], dl
mov esi, dword [esp + 0x78]
mov edi, dword [esp + 0x68]
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0x58]
mov ebx, dword [esp + 0x4c]
add edi, dword [esp + 0x6c]
add esi, dword [esp + 0x7c]
add edx, dword [esp + 0x5c]
sub eax, 2
add ecx, ebx
cmp eax, 2
mov dword [esp + 0x68], edi
mov dword [esp + 0x78], esi
mov dword [esp + 0x3c], eax
jge 0x59bb77
test eax, eax
je 0x59c2b3
test ecx, ecx
je 0x59bb08
cmp ecx, dword [esp + 0x40]
jb 0x59bb08
cmp ecx, dword [esp + 0x44]
ja 0x59bb08
test edx, edx
je 0x59bb08
cmp edx, dword [esp + 0x50]
jb 0x59bb08
cmp edx, dword [esp + 0x54]
ja 0x59bb08
test edi, edi
je 0x59bb08
cmp edi, dword [esp + 0x60]
jb 0x59bb08
cmp edi, dword [esp + 0x64]
ja 0x59bb08
test esi, esi
je 0x59bb08
cmp esi, dword [esp + 0x70]
jb 0x59bb08
cmp esi, dword [esp + 0x74]
ja 0x59bb08
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
cmp eax, 2
mov ebx, ecx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], edi
mov dword [esp + 0x3c], esi
jl 0x59c225
mov ecx, eax
shr ecx, 1
mov dword [esp + 0x34], ecx
neg ecx
lea ecx, [eax + ecx*2]
mov dword [esp + 0x2c], ecx
jmp 0x59c0d0
movzx edx, word [ebx]
mov word [esp + 0x10], dx
mov esi, dword [esp + 0x10]
mov eax, esi
shr eax, 7
movzx ecx, al
mov eax, esi
shr eax, 0xc
and eax, 7
or eax, ecx
mov edx, esi
shr edx, 2
movzx esi, dl
and ecx, 7
or ecx, esi
mov edx, ecx
mov cl, byte [esp + 0x10]
add cl, cl
mov edi, edx
imul edx, edx, 0x275
add cl, cl
add cl, cl
movzx ecx, cl
and esi, 7
or ecx, esi
mov esi, eax
imul eax, eax, 0xbb
add edx, eax
mov eax, ecx
shl eax, 6
sub eax, ecx
lea edx, [edx + eax + 0x4200]
mov eax, dword [esp + 0x24]
shr edx, 0xa
mov byte [eax], dl
movzx edx, word [ebx + 2]
mov word [esp + 0x10], dx
mov ebx, dword [esp + 0x10]
mov eax, ebx
shr eax, 7
movzx edx, al
mov eax, ebx
shr eax, 0xc
and eax, 7
or eax, edx
shr ebx, 2
movzx ebx, bl
and edx, 7
or edx, ebx
mov dword [esp + 0x14], edx
mov dl, byte [esp + 0x10]
add dl, dl
add dl, dl
and ebx, 7
add dl, dl
add esi, eax
imul eax, eax, 0xbb
movzx edx, dl
or edx, ebx
mov ebx, dword [esp + 0x14]
add edi, ebx
imul ebx, ebx, 0x275
add ebx, eax
mov eax, edx
shl eax, 6
sub eax, edx
lea eax, [ebx + eax + 0x4200]
shr eax, 0xa
add ecx, edx
mov edx, dword [esp + 0x24]
mov byte [edx + 1], al
mov eax, edi
imul eax, eax, 0x15b
mov ebx, esi
imul ebx, ebx, 0xffffff99
sub ebx, eax
mov eax, ecx
imul eax, eax, 0x1c2
lea ebx, [ebx + eax + 0x3ff]
shr ebx, 0xb
add bl, 0x80
mov eax, dword [esp + 0x28]
imul ecx, ecx, 0xffffffd7
imul edi, edi, 0x199
imul esi, esi, 0x1c2
sub ecx, edi
lea ecx, [ecx + esi + 0x3ff]
mov esi, dword [esp + 0x3c]
mov byte [eax], bl
mov ebx, dword [esp + 0x38]
shr ecx, 0xb
add cl, 0x80
mov byte [esi], cl
add eax, 1
add esi, 1
add ebx, 4
add edx, 2
sub dword [esp + 0x34], 1
mov dword [esp + 0x28], eax
mov dword [esp + 0x3c], esi
mov dword [esp + 0x38], ebx
mov dword [esp + 0x24], edx
jne 0x59c0d0
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x59c2b3
mov dx, word [ebx]
mov word [esp + 0x10], dx
mov ecx, dword [esp + 0x10]
mov eax, ecx
mov edi, ecx
add dl, dl
shr ecx, 2
add dl, dl
shr eax, 7
movzx ecx, cl
add dl, dl
movzx eax, al
movzx ebx, dl
shr edi, 0xc
and edi, 7
or edi, eax
and eax, 7
or eax, ecx
and ecx, 7
or ebx, ecx
mov ecx, eax
imul ecx, ecx, 0x275
mov edx, edi
imul edx, edx, 0xbb
add ecx, edx
mov edx, ebx
shl edx, 6
sub edx, ebx
lea ecx, [ecx + edx + 0x4200]
mov edx, dword [esp + 0x24]
shr ecx, 0xa
mov byte [edx], cl
push eax
push edi
xor ecx, ecx
mov edx, ebx
mov dword [esp + 0x1c], eax
call fcn.004e1640
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x28]
mov byte [ecx], al
push edx
push edi
xor ecx, ecx
mov eax, ebx
call fcn.004e1680
mov byte [esi], al
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret 4