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

Disassembly:
sub esp, 0x50
test edx, edx
push ebx
mov ebx, dword [esp + 0x64]
push ebp
mov ebp, dword [esp + 0x64]
push esi
mov esi, dword [esp + 0x64]
push edi
mov edi, dword [esp + 0x7c]
jne 0x59e67f
xor edx, edx
test edi, edi
setne dl
dec edx
and edx, 3
mov dword [esp + 0x38], edx
mov edx, dword [esp + 0x80]
test edx, edx
je 0x59e68e
mov dword [esp + 0x38], 1
jmp 0x59e68e
xor edx, edx
test edi, edi
sete dl
lea edx, [edx + edx + 2]
mov dword [esp + 0x38], edx
movsx edx, word [eax + 4]
movsx edi, word [eax + 0x10]
add edx, esi
add edi, esi
movsx esi, word [eax]
movsx eax, word [eax + 2]
add esi, ecx
test ebx, ebx
lea ecx, [eax + ecx - 1]
mov dword [esp + 0x4c], edx
mov dword [esp + 0x48], edi
mov dword [esp + 0x68], esi
mov dword [esp + 0x24], ecx
jle 0x59e6c9
mov eax, dword [esp + 0x74]
movsx eax, word [eax + 2]
sub eax, dword [ebp]
dec eax
jmp 0x59e6d5
mov ecx, dword [esp + 0x74]
movsx ecx, word [ecx]
mov eax, dword [ebp]
sub eax, ecx
mov ecx, dword [esp + 0x68]
add eax, ecx
cmp dword [esp + 0x24], eax
jle 0x59e6e5
mov dword [esp + 0x24], eax
mov ecx, edx
sar ecx, 5
mov eax, edi
and edx, 0x1f
sar eax, 5
sub eax, ecx
shl edx, 2
mov esi, edi
mov dword [esp + 0x5c], ecx
mov ecx, dword [edx + 0x682b28]
and esi, 0x1f
shl esi, 2
test eax, eax
mov dword [esp + 0x28], ecx
mov ecx, dword [esi + 0x682ba8]
mov dword [esp + 0x20], eax
mov dword [esp + 0x54], edx
mov dword [esp + 0x50], esi
mov dword [esp + 0x18], ecx
jne 0x59e72f
and dword [esp + 0x28], ecx
mov dword [esp + 0x18], eax
test ebx, ebx
jle 0x59e745
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 4
jmp 0x59e755
mov dword [esp + 0x34], 3
mov dword [esp + 0x30], 7
mov ecx, dword [esp + 0x24]
cmp dword [esp + 0x68], ecx
jg 0x59ecf0
jmp 0x59e779
mov ebx, dword [esp + 0x70]
mov ebp, dword [esp + 0x6c]
mov eax, dword [esp + 0x20]
mov esi, dword [esp + 0x50]
mov edx, dword [esp + 0x54]
mov ecx, dword [ebp + 0xc]
mov edi, dword [esp + 0x88]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x14], eax
mov eax, 0x80
sar eax, cl
test ebx, ebx
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x84]
mov dword [esp + 0x58], eax
jle 0x59e7ae
mov dword [esp + 0x44], edi
jmp 0x59e7b6
mov eax, edi
neg eax
mov dword [esp + 0x44], eax
mov eax, dword [0x6bf444]
mov ebp, dword [esi + eax]
mov edi, dword [edx + eax]
mov eax, dword [esp + 0x80]
test eax, eax
mov dword [esp + 0x40], ebp
je 0x59e7d8
mov edx, dword [esp + 0x28]
not edx
jmp 0x59e7da
xor edx, edx
mov esi, dword [esp + 0x24]
mov ebx, dword [esp + 0x68]
mov eax, dword [esp + 0x84]
sub esi, ebx
cmp esi, 3
jl 0x59ea6d
cmp ecx, dword [esp + 0x34]
jne 0x59e925
mov esi, dword [esp + 0x20]
mov ecx, eax
mov dword [esp + 0x3c], ecx
xor ecx, ecx
test esi, esi
setne cl
mov esi, edx
mov ebx, edx
mov dword [esp + 0x1c], edx
dec ecx
and ecx, ebp
cmp edi, ecx
mov dword [esp + 0x2c], ecx
je 0x59e85e
mov ecx, dword [esp + 0x14]
movzx ecx, byte [ecx]
test cl, cl
jns 0x59e82f
or edx, edi
test cl, 0x40
je 0x59e838
or dword [esp + 0x1c], edi
test cl, 0x20
je 0x59e83f
or ebx, edi
test cl, 0x10
je 0x59e846
or esi, edi
mov ecx, dword [esp + 0x78]
mov ebp, dword [esp + 0x14]
add ebp, ecx
mov ecx, dword [esp + 0x2c]
shl edi, 1
cmp edi, ecx
mov dword [esp + 0x14], ebp
jne 0x59e822
mov ecx, dword [esp + 0x88]
mov ebp, dword [esp + 0x6c]
mov dword [eax], edx
mov edx, dword [esp + 0x1c]
shl ecx, 2
add eax, ecx
mov dword [eax], edx
add eax, ecx
mov dword [eax], ebx
mov dword [ecx + eax], esi
mov ecx, dword [0x6bf444]
mov eax, dword [esp + 0x3c]
mov edi, dword [ecx]
mov ecx, dword [esp + 0x10]
add eax, 4
cmp ecx, 1
mov dword [esp + 0x3c], eax
jg 0x59e8e4
test ecx, ecx
jle 0x59e8fe
mov ecx, dword [esp + 0x80]
test ecx, ecx
je 0x59e8c8
mov ebp, dword [esp + 0x10]
mov esi, dword [esp + 0x18]
mov ecx, dword [esp + 0x40]
not esi
dec ebp
mov ebx, esi
mov dword [esp + 0x1c], esi
mov edx, esi
mov dword [esp + 0x10], ebp
jmp 0x59e81a
mov ebp, dword [esp + 0x10]
mov ecx, dword [esp + 0x40]
xor esi, esi
dec ebp
mov ebx, esi
mov dword [esp + 0x1c], esi
mov edx, esi
mov dword [esp + 0x10], ebp
jmp 0x59e81a
mov ebp, dword [esp + 0x10]
xor ecx, ecx
xor esi, esi
xor ebx, ebx
xor edx, edx
dec ebp
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x10], ebp
jmp 0x59e81a
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x68]
mov dword [ebp + 0xc], eax
mov eax, dword [esp + 0x70]
add edx, 4
test eax, eax
mov dword [esp + 0x1c], edx
jge 0x59ea5e
mov ecx, dword [ebp + 8]
dec ecx
jmp 0x59ea5b
cmp ecx, dword [esp + 0x30]
jne 0x59ea6d
mov ecx, dword [esp + 0x84]
mov esi, dword [esp + 0x20]
mov dword [esp + 0x3c], ecx
xor ecx, ecx
test esi, esi
setne cl
mov esi, edx
mov ebx, edx
mov dword [esp + 0x1c], edx
dec ecx
and ecx, ebp
cmp edi, ecx
mov dword [esp + 0x2c], ecx
je 0x59e99d
jmp 0x59e960
mov ecx, dword [esp + 0x14]
movzx ecx, byte [ecx]
test cl, 8
je 0x59e96e
or edx, edi
test cl, 4
je 0x59e977
or dword [esp + 0x1c], edi
test cl, 2
je 0x59e97e
or ebx, edi
test cl, 1
je 0x59e985
or esi, edi
mov ecx, dword [esp + 0x78]
mov ebp, dword [esp + 0x14]
add ebp, ecx
mov ecx, dword [esp + 0x2c]
shl edi, 1
cmp edi, ecx
mov dword [esp + 0x14], ebp
jne 0x59e960
mov ecx, dword [esp + 0x88]
mov ebp, dword [esp + 0x6c]
mov dword [eax], edx
mov edx, dword [esp + 0x1c]
shl ecx, 2
add eax, ecx
mov dword [eax], edx
add eax, ecx
mov dword [eax], ebx
mov dword [ecx + eax], esi
mov ecx, dword [0x6bf444]
mov eax, dword [esp + 0x3c]
mov edi, dword [ecx]
mov ecx, dword [esp + 0x10]
add eax, 4
cmp ecx, 1
mov dword [esp + 0x3c], eax
jg 0x59ea23
test ecx, ecx
jle 0x59ea3d
mov ecx, dword [esp + 0x80]
test ecx, ecx
je 0x59ea07
mov ebp, dword [esp + 0x10]
mov esi, dword [esp + 0x18]
mov ecx, dword [esp + 0x40]
not esi
dec ebp
mov ebx, esi
mov dword [esp + 0x1c], esi
mov edx, esi
mov dword [esp + 0x10], ebp
jmp 0x59e950
mov ebp, dword [esp + 0x10]
mov ecx, dword [esp + 0x40]
xor esi, esi
dec ebp
mov ebx, esi
mov dword [esp + 0x1c], esi
mov edx, esi
mov dword [esp + 0x10], ebp
jmp 0x59e950
mov ebp, dword [esp + 0x10]
xor ecx, ecx
xor esi, esi
xor ebx, ebx
xor edx, edx
dec ebp
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x10], ebp
jmp 0x59e950
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x68]
mov dword [ebp + 0xc], eax
mov eax, dword [esp + 0x70]
add edx, 4
test eax, eax
mov dword [esp + 0x1c], edx
jle 0x59ea5e
mov ecx, dword [ebp + 8]
inc ecx
mov dword [ebp + 8], ecx
lea ecx, [eax*4]
add dword [ebp], ecx
jmp 0x59eb2d
mov ecx, dword [esp + 0x20]
xor ebx, ebx
test ecx, ecx
setne bl
mov esi, edi
mov dword [esp + 0x2c], ecx
dec ebx
and ebx, ebp
mov edi, ebx
mov ebx, dword [esp + 0x14]
cmp esi, edi
je 0x59eaaa
jmp 0x59ea90
mov cl, byte [esp + 0x3c]
test byte [ebx], cl
je 0x59ea9a
or edx, esi
mov ecx, dword [esp + 0x78]
shl esi, 1
add ebx, ecx
cmp esi, edi
jne 0x59ea90
mov ecx, dword [esp + 0x2c]
mov dword [eax], edx
mov edx, dword [0x6bf444]
mov esi, dword [edx]
add eax, 4
cmp ecx, 1
ja 0x59eae5
test ecx, ecx
jbe 0x59eaf0
mov edx, dword [esp + 0x80]
test edx, edx
je 0x59eada
mov edx, dword [esp + 0x18]
dec ecx
not edx
mov edi, ebp
mov dword [esp + 0x2c], ecx
jmp 0x59ea87
xor edx, edx
dec ecx
mov edi, ebp
mov dword [esp + 0x2c], ecx
jmp 0x59ea87
xor edx, edx
xor edi, edi
dec ecx
mov dword [esp + 0x2c], ecx
jmp 0x59ea87
mov ecx, dword [esp + 0x6c]
mov eax, dword [ecx + 0xc]
mov edx, dword [esp + 0x70]
add eax, edx
mov dword [ecx + 0xc], eax
jns 0x59eb0f
mov eax, dword [ecx + 8]
mov dword [ecx + 0xc], 7
dec eax
jmp 0x59eb1f
cmp eax, 8
jl 0x59eb22
mov eax, dword [ecx + 8]
mov dword [ecx + 0xc], 0
inc eax
mov dword [ecx + 8], eax
add dword [ecx], edx
mov eax, dword [esp + 0x68]
inc eax
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x70]
test eax, eax
jge 0x59eb54
mov edx, dword [esp + 0x68]
mov ecx, dword [esp + 0x1c]
sub ecx, edx
mov edx, dword [esp + 0x84]
dec ecx
imul ecx, dword [esp + 0x88]
lea edi, [edx + ecx*4]
jmp 0x59eb58
mov edi, dword [esp + 0x58]
mov eax, dword [esp + 0x1c]
cmp dword [esp + 0x68], eax
jge 0x59ece2
mov ecx, dword [esp + 0x44]
mov ebp, dword [esp + 0x28]
mov ebx, dword [esp + 0x20]
lea edx, [ecx*4]
mov dword [esp + 0x58], edx
lea ecx, [ecx]
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0x7c]
push edx
mov edx, dword [esp + 0x50]
push edx
mov edx, dword [esp + 0x70]
test eax, eax
mov eax, dword [esp + 0x6c]
mov ecx, dword [eax + 4]
mov eax, dword [eax + 8]
push edx
mov esi, ebx
push eax
je 0x59eba9
call dword [ecx + 4]
jmp 0x59ebab
call dword [ecx]
mov ecx, dword [esp + 0x6c]
lea eax, [eax + ecx*4]
mov ecx, dword [esp + 0x48]
add esp, 0x10
cmp ecx, 4
ja case.default.0x59ebc2
jmp dword [ecx*4 + 0x59ecf8]
mov ecx, edi
sub ecx, eax
lea ecx, [ecx]
mov edx, dword [ecx + eax]
or dword [eax], edx
add eax, 4
mov edx, esi
dec esi
test edx, edx
ja 0x59ebd0
jmp case.default.0x59ebc2
mov ecx, edi
sub ecx, eax
mov edx, dword [ecx + eax]
not edx
or dword [eax], edx
add eax, 4
mov edx, esi
dec esi
test edx, edx
ja 0x59ebe8
jmp case.default.0x59ebc2
mov ecx, dword [esp + 0x80]
test ecx, ecx
mov ecx, edi
je 0x59ec24
sub ecx, eax
lea ecx, [ecx]
mov edx, dword [ecx + eax]
and dword [eax], edx
add eax, 4
mov edx, esi
dec esi
test edx, edx
ja 0x59ec10
jmp case.default.0x59ebc2
sub ecx, eax
mov edx, dword [ecx + eax]
not edx
and dword [eax], edx
add eax, 4
mov edx, esi
dec esi
test edx, edx
ja 0x59ec26
jmp case.default.0x59ebc2
mov edx, dword [eax]
mov ecx, ebp
not ecx
and ecx, edx
mov edx, dword [edi]
and edx, ebp
or ecx, edx
mov dword [eax], ecx
add eax, 4
test ebx, ebx
lea ecx, [edi + 4]
je case.default.0x59ebc2
lea edx, [ebx - 1]
test edx, edx
jbe 0x59ec6d
lea ecx, [ecx]
mov esi, dword [ecx]
mov dword [eax], esi
add eax, 4
add ecx, 4
dec edx
jne 0x59ec60
mov edx, dword [esp + 0x18]
mov ecx, dword [ecx]
mov esi, edx
not esi
and esi, dword [eax]
and ecx, edx
or esi, ecx
mov dword [eax], esi
jmp case.default.0x59ebc2
mov ecx, dword [eax]
mov edx, ebp
not edx
and edx, ecx
mov ecx, dword [edi]
not ecx
and ecx, ebp
or edx, ecx
mov dword [eax], edx
add eax, 4
test ebx, ebx
lea ecx, [edi + 4]
je case.default.0x59ebc2
lea edx, [ebx - 1]
test edx, edx
jbe 0x59ecb3
mov esi, dword [ecx]
not esi
mov dword [eax], esi
add eax, 4
add ecx, 4
dec edx
jne 0x59eca4
mov edx, dword [ecx]
mov ecx, dword [esp + 0x18]
mov esi, dword [eax]
not edx
and edx, ecx
not ecx
and ecx, esi
or edx, ecx
mov dword [eax], edx
mov esi, dword [esp + 0x58]
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x1c]
add edi, esi
inc eax
cmp eax, ecx
mov dword [esp + 0x68], eax
jl 0x59eb80
mov eax, dword [esp + 0x68]
cmp eax, dword [esp + 0x24]
jle 0x59e765
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret