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

Disassembly:
sub esp, 0x50
push ebx
mov ebx, dword [esp + 0x60]
push ebp
push esi
mov esi, dword [esp + 0x6c]
push edi
mov edi, dword [esp + 0x74]
lea eax, [edi + 7]
cdq
and edx, 7
add eax, edx
mov ebp, eax
sar ebp, 3
cmp ebx, ebp
mov dword [esp + 0x5c], ebp
jl 0x5f0d6d
lea eax, [edi*4 + 7]
cdq
and edx, 7
add eax, edx
sar eax, 3
cmp esi, eax
jge 0x5f0d7c
push 0
push 0x204
call fcn.0047e830
add esp, 8
mov eax, dword [esp + 0x88]
test eax, eax
mov ecx, dword [esp + 0x78]
je 0x5f13c9
cmp edi, 5
jl 0x5f13c9
cmp ecx, 5
jl 0x5f13c9
mov ecx, dword [esp + 0x84]
mov edx, dword [esp + 0x7c]
xor eax, eax
test ecx, ecx
setne al
mov esi, edx
and esi, 8
mov edi, eax
mov dword [esp + 0x2c], edi
jne 0x5f0dc5
test dl, 4
je 0x5f0e23
mov eax, dword [esp + 0x80]
test eax, eax
jne 0x5f0ddb
mov edi, 2
mov dword [esp + 0x2c], edi
jmp 0x5f0e23
test edi, edi
jne 0x5f0dfa
mov ecx, dword [esp + 0x80]
push ebp
push edi
push ecx
call fcn.0047e890
mov edx, dword [esp + 0x88]
add esp, 0xc
jmp 0x5f0e23
cmp edi, 1
jne 0x5f0e23
test ebp, ebp
jle 0x5f0e23
mov edi, dword [esp + 0x80]
mov ecx, ebp
shr ecx, 2
or eax, 0xffffffff
rep stosd dword es:[edi], eax
mov ecx, ebp
mov ebp, dword [esp + 0x5c]
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x78]
mov eax, 2
sub ecx, eax
test esi, esi
mov dword [esp + 0x78], ecx
jne 0x5f0e4e
sub ecx, eax
mov eax, dword [esp + 0x64]
mov dword [esp + 0x40], eax
add eax, ebx
mov dword [esp + 0x30], eax
mov dword [esp + 0x78], ecx
add eax, ebx
jmp 0x5f0e67
cmp edi, eax
mov eax, dword [esp + 0x64]
mov ecx, eax
je 0x5f0e5f
mov ecx, dword [esp + 0x80]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], eax
add eax, ebx
test bl, 1
mov dword [esp + 0x34], eax
mov dword [esp + 0x50], 0
je 0x5f0e8a
cmp ebx, ebp
jne 0x5f0e8a
mov dword [esp + 0x50], 1
mov ecx, dword [esp + 0x74]
sub ecx, 2
and edx, 4
mov eax, edx
mov dword [esp + 0x74], ecx
mov dword [esp + 0x5c], eax
mov dword [esp + 0x48], eax
mov ecx, dword [esp + 0x78]
mov edx, ecx
dec ecx
test edx, edx
mov dword [esp + 0x78], ecx
jle 0x5f0ebd
mov eax, dword [esp + 0x34]
add eax, ebx
mov dword [esp + 0x4c], eax
jmp 0x5f0ee7
xor ecx, ecx
cmp eax, ecx
je 0x5f0ed9
cmp edi, 2
mov dword [esp + 0x5c], ecx
je 0x5f0ee7
mov ecx, dword [esp + 0x80]
mov dword [esp + 0x4c], ecx
jmp 0x5f0ee7
cmp dword [esp + 0x48], ecx
je 0x5f13e3
mov dword [esp + 0x48], ecx
mov ecx, dword [esp + 0x68]
mov edx, dword [esp + 0x70]
mov edi, dword [esp + 0x30]
mov ebp, dword [esp + 0x44]
mov ebx, dword [esp + 0x34]
mov eax, dword [esp + 0x4c]
mov esi, dword [esp + 0x40]
mov dword [esp + 0x24], ecx
lea ecx, [ecx + edx*4]
mov edx, dword [esp + 0x74]
mov dword [esp + 0x68], ecx
mov ecx, 1
mov dword [esp + 0x54], ecx
mov dword [esp + 0x58], ecx
mov ecx, dword [esp + 0x50]
mov dword [esp + 0x38], edx
xor edx, edx
test ecx, ecx
mov dword [esp + 0x40], edi
mov dword [esp + 0x30], ebp
mov dword [esp + 0x44], ebx
mov dword [esp + 0x34], eax
mov dword [esp + 0x3c], edx
mov dword [esp + 0x88], edx
je 0x5f0f7c
xor ecx, ecx
mov ch, byte [esi]
inc esi
mov dword [esp + 0x10], ecx
xor ecx, ecx
mov ch, byte [edi]
inc edi
mov dword [esp + 0x18], ecx
xor ecx, ecx
mov ch, byte [ebp]
inc ebp
mov dword [esp + 0x1c], ecx
xor ecx, ecx
mov ch, byte [ebx]
inc ebx
mov dword [esp + 0x20], ecx
xor ecx, ecx
mov ch, byte [eax]
mov dword [esp + 0x14], ecx
mov ecx, 0x100
jmp 0x5f0fdd
movzx dx, byte [esi + 1]
xor ecx, ecx
mov ch, byte [esi]
inc esi
or ecx, edx
movzx dx, byte [edi + 1]
mov dword [esp + 0x10], ecx
xor ecx, ecx
mov ch, byte [edi]
inc esi
inc edi
or ecx, edx
movzx dx, byte [ebp + 1]
mov dword [esp + 0x18], ecx
xor ecx, ecx
mov ch, byte [ebp]
inc edi
inc ebp
or ecx, edx
movzx dx, byte [ebx + 1]
mov dword [esp + 0x1c], ecx
xor ecx, ecx
mov ch, byte [ebx]
inc ebp
inc ebx
or ecx, edx
movzx dx, byte [eax + 1]
mov dword [esp + 0x20], ecx
xor ecx, ecx
mov ch, byte [eax]
inc ebx
inc eax
or ecx, edx
mov edx, dword [esp + 0x88]
mov dword [esp + 0x14], ecx
mov ecx, 1
inc eax
cmp dword [esp + 0x2c], 1
mov dword [esp + 0x28], eax
jne 0x5f0fee
mov edx, 0x3ff
add edx, edx
cmp word [esp + 0x10], 0
mov dword [esp + 0x88], edx
jge 0x5f1009
or edx, 1
mov dword [esp + 0x88], edx
mov edx, dword [esp + 0x10]
add edx, edx
or edx, ecx
mov ecx, dword [esp + 0x88]
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x18]
add ecx, ecx
test dx, dx
jge 0x5f102a
or ecx, 1
add edx, edx
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x1c]
add ecx, ecx
test dx, dx
jge 0x5f103e
or ecx, 1
add edx, edx
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x20]
add ecx, ecx
test dx, dx
jge 0x5f1052
or ecx, 1
add edx, edx
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x14]
add ecx, ecx
test dx, dx
jge 0x5f1066
or ecx, 1
add edx, edx
mov dword [esp + 0x14], edx
cmp dword [esp + 0x2c], 2
jne 0x5f107f
mov edx, ecx
shl edx, 5
or edx, ecx
shl edx, 5
or ecx, edx
mov edx, dword [esp + 0x10]
add ecx, ecx
test dx, dx
jge 0x5f108d
or ecx, 1
add edx, edx
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x18]
add ecx, ecx
test dx, dx
jge 0x5f10a1
or ecx, 1
add edx, edx
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x1c]
add ecx, ecx
test dx, dx
jge 0x5f10b5
or ecx, 1
add edx, edx
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x20]
add ecx, ecx
test dx, dx
jge 0x5f10c9
or ecx, 1
add ecx, ecx
mov dword [esp + 0x88], ecx
mov ecx, dword [esp + 0x14]
add edx, edx
test cx, cx
mov dword [esp + 0x20], edx
jge 0x5f10e9
or dword [esp + 0x88], 1
lea edx, [ecx + ecx]
mov dword [esp + 0x14], edx
mov ecx, dword [esp + 0x38]
mov edx, ecx
dec ecx
test edx, edx
mov dword [esp + 0x38], ecx
jle 0x5f1255
mov ecx, dword [esp + 0x10]
lea edx, [ecx + ecx]
test dx, dx
jne 0x5f11e0
movzx dx, byte [esi + 1]
xor ecx, ecx
mov ch, byte [esi]
inc esi
or ecx, edx
movzx dx, byte [edi + 1]
mov dword [esp + 0x10], ecx
xor ecx, ecx
mov ch, byte [edi]
inc esi
inc edi
or ecx, edx
movzx dx, byte [ebp + 1]
mov dword [esp + 0x18], ecx
xor ecx, ecx
mov ch, byte [ebp]
inc edi
inc ebp
or ecx, edx
movzx dx, byte [ebx + 1]
mov dword [esp + 0x1c], ecx
xor ecx, ecx
mov ch, byte [ebx]
inc ebp
inc ebx
or ecx, edx
movzx dx, byte [eax + 1]
mov dword [esp + 0x20], ecx
xor ecx, ecx
mov ch, byte [eax]
inc ebx
inc eax
or ecx, edx
inc eax
cmp word [esp + 0x1c], 0
mov dword [esp + 0x14], ecx
jne 0x5f11bd
or cl, byte [esp + 0x20]
or cl, byte [esp + 0x18]
or cl, byte [esp + 0x10]
test cl, 0x1f
jne 0x5f11b9
test dword [esp + 0x88], 0x3ff
jne 0x5f11b9
add dword [esp + 0x24], 8
mov ecx, dword [esp + 0x38]
sub ecx, 0x10
xor edx, edx
test ecx, ecx
mov dword [esp + 0x88], edx
mov dword [esp + 0x38], ecx
jg 0x5f1113
mov dword [esp + 0x28], eax
jmp 0x5f125c
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x88]
add eax, eax
cmp word [esp + 0x10], 0
jge 0x5f11d5
or eax, 1
mov edx, dword [esp + 0x10]
add edx, edx
or edx, 1
jmp 0x5f11f5
mov eax, dword [esp + 0x88]
add eax, eax
test cx, cx
jge 0x5f11f1
or eax, 1
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x18]
add eax, eax
test dx, dx
jge 0x5f1207
or eax, 1
add edx, edx
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x1c]
add eax, eax
test dx, dx
jge 0x5f121b
or eax, 1
add edx, edx
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x20]
add eax, eax
test dx, dx
jge 0x5f122f
or eax, 1
add edx, edx
add eax, eax
test cx, cx
mov dword [esp + 0x20], edx
mov dword [esp + 0x88], eax
jge 0x5f124d
or eax, 1
mov dword [esp + 0x88], eax
add ecx, ecx
mov dword [esp + 0x14], ecx
jmp 0x5f12a9
mov edx, dword [esp + 0x88]
mov eax, dword [esp + 0x2c]
cmp eax, 2
jne 0x5f1271
mov eax, edx
and eax, 0x1f
shl edx, 5
or eax, edx
jmp 0x5f1284
xor ecx, ecx
cmp eax, 1
setne cl
shl edx, 5
dec ecx
and ecx, 0x1f
or ecx, edx
mov eax, ecx
mov edx, dword [esp + 0x54]
xor ecx, ecx
cmp edx, ecx
mov dword [esp + 0x88], eax
je 0x5f129b
mov dword [esp + 0x54], ecx
jmp 0x5f12a9
cmp dword [esp + 0x58], ecx
je 0x5f13b8
mov dword [esp + 0x58], ecx
mov ecx, eax
and ecx, 0x21080
cmp ecx, 0x21080
je 0x5f136a
and eax, 0x3800
cmp eax, 0x3800
je 0x5f136a
test ecx, ecx
je 0x5f139a
test eax, eax
je 0x5f139a
mov eax, dword [esp + 0x84]
test eax, eax
mov edx, dword [esp + 0x88]
je 0x5f12fa
not edx
call fcn.005f0760
not eax
jmp 0x5f12ff
call fcn.005f0760
mov ecx, dword [esp + 0x3c]
test ecx, ecx
mov ecx, dword [esp + 0x24]
mov edx, eax
jne 0x5f133c
sar edx, 8
and dl, 0xf0
mov byte [ecx], dl
mov edx, dword [esp + 0x70]
add ecx, edx
mov edx, eax
sar edx, 4
and dl, 0xf0
mov byte [ecx], dl
add ecx, dword [esp + 0x70]
mov dl, al
and dl, 0xf0
mov byte [ecx], dl
mov edx, dword [esp + 0x70]
shl al, 4
mov byte [ecx + edx], al
jmp 0x5f139a
sar edx, 0xc
and dl, 0xf
or byte [ecx], dl
mov edx, dword [esp + 0x70]
add ecx, edx
mov edx, eax
sar edx, 8
and dl, 0xf
or byte [ecx], dl
add ecx, dword [esp + 0x70]
mov dl, al
sar dl, 4
and dl, 0xf
or byte [ecx], dl
mov edx, dword [esp + 0x70]
and al, 0xf
jmp 0x5f1396
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x24]
mov dl, byte [ecx]
neg eax
sbb eax, eax
and eax, 0xffffff1f
add eax, 0xf0
or dl, al
mov byte [ecx], dl
mov edx, dword [esp + 0x70]
add ecx, edx
or byte [ecx], al
mov edx, dword [esp + 0x70]
add ecx, edx
or byte [ecx], al
add ecx, edx
or byte [ecx], al
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0x24]
add edx, eax
xor eax, 1
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x24], edx
jmp 0x5f10f0
mov ebx, dword [esp + 0x6c]
mov edi, dword [esp + 0x2c]
mov eax, dword [esp + 0x5c]
jmp 0x5f0ea2
mov eax, dword [esp + 0x7c]
mov edx, dword [esp + 0x68]
push eax
mov eax, dword [esp + 0x68]
push edi
push esi
push ebx
push edx
push eax
call fcn.005f0580
add esp, 0x18
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret