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

Disassembly:
sub esp, 0x3c
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x50]
push edi
call fcn.00480910
mov ebx, dword [esp + 0x64]
mov esi, dword [esp + 0x58]
add esp, 4
cmp ebx, 8
mov dword [esp + 0x40], 0
jne 0x4594f5
mov al, byte [esp + 0x68]
test al, al
je 0x4594f5
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x3c]
push ecx
push esi
push edi
call fcn.004801c0
add esp, 0x10
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x3c]
push ecx
push esi
push edi
call fcn.00480200
mov ebp, dword [esp + 0x6c]
test eax, eax
setne byte [esp + 0x34]
mov eax, ebp
imul eax, ebx
cdq
and edx, 7
add eax, edx
sar eax, 3
push eax
call fcn.00465cf6
mov edi, dword [esp + 0x74]
mov dword [esp + 0x78], eax
lea eax, [ebp + ebp*2 + 3]
cdq
and edx, 3
add eax, edx
mov ecx, eax
sar ecx, 2
shl ecx, 2
lea eax, [ebp + 3]
cdq
mov dword [esp + 0x28], ecx
imul ecx, edi
and edx, 3
add eax, edx
mov esi, eax
sar esi, 2
shl esi, 2
push ecx
mov dword [esp + 0x30], esi
call fcn.00465cf6
imul esi, edi
push esi
mov dword [esp + 0x38], eax
call fcn.00465cf6
mov esi, eax
mov eax, dword [esp + 0x84]
add esp, 0x20
test eax, eax
mov dword [esp + 0x24], esi
jne 0x4596ba
test edi, edi
jle 0x459875
mov edx, dword [esp + 0x18]
mov dword [esp + 0x54], edx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x28], edi
mov edi, dword [esp + 0x60]
mov eax, dword [esp + 0x50]
push 0
push edi
push eax
call fcn.0047f8b0
add esp, 0xc
cmp ebx, 0x18
je 0x459672
cmp ebx, 0x20
je 0x459630
test ebp, ebp
jle 0x45968a
mov ecx, dword [esp + 0x58]
mov ebp, dword [esp + 0x54]
xor edi, edi
mov dword [esp + 0x64], ecx
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
push edx
mov edx, dword [esp + 0x24]
push eax
mov eax, dword [esp + 0x70]
push ecx
mov ecx, dword [esp + 0x44]
push edx
push eax
mov eax, edi
cdq
and edx, 7
push ebx
add eax, edx
mov edx, dword [esp + 0x78]
push ecx
sar eax, 3
push esi
add eax, edx
push eax
push ebp
call 0x459980
mov eax, dword [esp + 0x8c]
add esp, 0x28
inc esi
add edi, ebx
add ebp, 3
dec eax
mov dword [esp + 0x64], eax
jne 0x4595db
mov ebp, dword [esp + 0x58]
jmp 0x45968a
test ebp, ebp
mov edi, dword [esp + 0x54]
mov eax, dword [esp + 0x60]
jle 0x45968a
mov dword [esp + 0x64], ebp
mov edx, eax
mov bp, word [edx]
mov ecx, edi
mov word [ecx], bp
mov dl, byte [edx + 2]
mov byte [ecx + 2], dl
mov dl, byte [eax + 3]
or cl, 0xff
sub cl, dl
mov byte [esi], cl
mov ecx, dword [esp + 0x64]
inc esi
add eax, 4
add edi, 3
dec ecx
mov dword [esp + 0x64], ecx
jne 0x459640
mov ebp, dword [esp + 0x58]
jmp 0x45968a
lea ecx, [ebp + ebp*2]
mov edx, ecx
mov esi, edi
mov edi, dword [esp + 0x54]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x54]
mov esi, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
add ecx, eax
mov eax, dword [esp + 0x28]
add esi, edx
dec eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x54], ecx
mov dword [esp + 0x28], eax
jne 0x4595a3
jmp 0x459871
cmp eax, 1
jne 0x459962
lea eax, [ebp + 7]
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dword [esp + 0x28], eax
lea eax, [edi + 7]
cdq
and edx, 7
add eax, edx
mov ecx, eax
sar ecx, 3
xor esi, esi
mov dword [esp + 0x48], ecx
mov dword [esp + 0x54], esi
test ecx, ecx
mov dword [esp + 0x1c], 0
jbe 0x459861
lea eax, [esi + 0x49f434]
mov edx, dword [eax]
xor edi, edi
test edx, edx
mov dword [esp + 0x3c], edi
jle 0x459850
mov ebp, dword [esi + 0x49f46c]
mov ecx, dword [esp + 0x1c]
imul ebp, edi
lea eax, [ecx*8]
mov ecx, dword [esi + 0x49f450]
add ebp, eax
mov eax, dword [esp + 0x5c]
add ebp, ecx
cmp ebp, eax
jge 0x45982f
mov edx, dword [esp + 0x60]
mov eax, dword [esp + 0x50]
push 0
push edx
push eax
call fcn.0047f8b0
mov ecx, dword [esp + 0x34]
xor eax, eax
add esp, 0xc
test ecx, ecx
mov dword [esp + 0x64], eax
jbe 0x45982f
lea edi, [esi + 0x49f4a4]
jmp 0x45976d
mov esi, dword [esp + 0x54]
mov ecx, dword [esi + 0x49f488]
lea edx, [ecx + eax*8]
mov eax, dword [edi]
xor esi, esi
test eax, eax
mov dword [esp + 0x44], edx
jle 0x459812
mov eax, dword [esp + 0x54]
mov eax, dword [eax + 0x49f4c0]
mov edx, dword [esp + 0x44]
imul eax, esi
mov ecx, dword [esp + 0x58]
add eax, edx
cmp eax, ecx
jge 0x459812
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
push ecx
mov ecx, dword [esp + 0x38]
push edx
mov edx, dword [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x74]
push edx
mov edx, dword [esp + 0x48]
push ecx
mov ecx, ebp
imul ecx, dword [esp + 0x28]
push ebx
push edx
mov edx, dword [esp + 0x40]
add ecx, eax
add ecx, edx
mov edx, dword [edi]
imul edx, dword [esp + 0x80]
add edx, esi
imul edx, ebx
push ecx
mov ecx, dword [esp + 0x80]
shr edx, 3
add edx, ecx
mov ecx, ebp
imul ecx, dword [esp + 0x30]
push edx
lea edx, [eax + eax*2]
mov eax, dword [esp + 0x3c]
add eax, ecx
add edx, eax
push edx
call 0x459980
mov eax, dword [edi]
add esp, 0x28
inc esi
cmp esi, eax
jl 0x459786
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0x28]
inc eax
cmp eax, ecx
mov dword [esp + 0x64], eax
jb 0x459769
mov edi, dword [esp + 0x3c]
mov esi, dword [esp + 0x54]
mov ecx, dword [esi + 0x49f434]
lea eax, [esi + 0x49f434]
inc edi
cmp edi, ecx
mov dword [esp + 0x3c], edi
jl 0x459711
mov ebp, dword [esp + 0x58]
mov ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x1c]
inc edx
cmp edx, ecx
mov dword [esp + 0x1c], edx
jb 0x459701
add esi, 4
cmp esi, 0x1c
mov dword [esp + 0x54], esi
jl 0x4596eb
mov edi, dword [esp + 0x5c]
mov ecx, dword [esp + 0x60]
push ecx
call fcn.00465ceb
push 1
push edi
push ebp
call fcn.00452360
add esp, 0x10
xor edx, edx
test edi, edi
mov dword [0x5b2b48], eax
jle 0x4598d5
mov esi, dword [esp + 0x18]
mov dword [esp + 0x58], esi
jmp 0x4598a5
mov eax, dword [0x5b2b48]
mov edi, dword [eax + 8]
mov ecx, dword [esp + 0x10]
imul edi, edx
add edi, dword [eax + 0x28]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x58]
mov ecx, eax
mov eax, dword [esp + 0x5c]
inc edx
add esi, ecx
cmp edx, eax
mov dword [esp + 0x58], esi
jl 0x4598a0
mov al, byte [esp + 0x20]
test al, al
jne 0x4598f1
mov al, byte [esp + 0x68]
test al, al
je 0x4598ec
cmp ebx, 0x20
jge 0x4598f1
jmp 0x459943
cmp ebx, 0x10
jl 0x459943
mov esi, dword [esp + 0x5c]
push 1
push esi
push ebp
call fcn.004524e0
add esp, 0xc
xor edx, edx
test esi, esi
mov dword [0x5b2b4c], eax
jle 0x459943
mov ebx, dword [esp + 0x24]
jmp 0x459917
mov eax, dword [0x5b2b4c]
mov edi, dword [eax + 8]
mov ebp, dword [eax + 0x28]
imul edi, edx
mov ecx, dword [esp + 0x14]
mov eax, ecx
shr ecx, 2
add edi, ebp
mov esi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, eax
mov eax, dword [esp + 0x5c]
inc edx
add ebx, ecx
cmp edx, eax
jl 0x459912
mov ecx, dword [esp + 0x18]
push ecx
call fcn.00465ceb
mov edx, dword [esp + 0x28]
push edx
call fcn.00465ceb
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
push 0x4a4c20
lea eax, [esp + 0x60]
push eax
mov dword [esp + 0x64], 6
call fcn.004657b4
nop
nop
nop
nop
nop
nop
nop
mov al, byte [esp + 0x18]
test al, al
push esi
push edi
je 0x459a7d
mov ecx, dword [esp + 0x1c]
cmp ecx, 8
jne 0x459a08
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
xor ecx, ecx
mov cl, byte [eax]
lea esi, [edx + ecx*2]
mov cl, byte [ecx + esi + 2]
mov esi, dword [esp + 0xc]
mov byte [esi], cl
xor ecx, ecx
mov cl, byte [eax]
mov edi, ecx
lea ecx, [edx + edi*2]
mov cl, byte [edi + ecx + 1]
mov byte [esi + 1], cl
xor ecx, ecx
mov cl, byte [eax]
lea edx, [edx + ecx*2]
mov cl, byte [ecx + edx]
mov byte [esi + 2], cl
mov cl, byte [esp + 0x24]
test cl, cl
je 0x459aca
mov ecx, dword [esp + 0x2c]
xor edx, edx
mov dl, byte [eax]
mov eax, edx
cmp eax, ecx
jge 0x4599fe
mov edx, dword [esp + 0x28]
push ebx
mov bl, byte [eax + edx]
mov eax, dword [esp + 0x18]
or cl, 0xff
sub cl, bl
pop ebx
pop edi
mov byte [eax], cl
pop esi
ret
mov ecx, dword [esp + 0x14]
pop edi
mov byte [ecx], 0
pop esi
ret
cmp ecx, 0x18
mov eax, dword [esp + 0x10]
jl 0x459a23
mov esi, dword [esp + 0xc]
mov edx, eax
mov di, word [edx]
mov word [esi], di
mov dl, byte [edx + 2]
mov byte [esi + 2], dl
cmp ecx, 0x20
jl 0x459a39
mov dl, byte [eax + 3]
or cl, 0xff
sub cl, dl
mov edx, dword [esp + 0x14]
pop edi
mov byte [edx], cl
pop esi
ret
mov cl, byte [esp + 0x24]
test cl, cl
je 0x459aca
movzx dx, byte [eax]
mov ecx, dword [esp + 0x30]
cmp dx, word [ecx + 6]
jne 0x459a73
movzx dx, byte [eax + 1]
cmp dx, word [ecx + 4]
jne 0x459a73
movzx ax, byte [eax + 2]
cmp ax, word [ecx + 2]
jne 0x459a73
mov ecx, dword [esp + 0x14]
pop edi
mov byte [ecx], 0xff
pop esi
ret
mov edx, dword [esp + 0x14]
pop edi
mov byte [edx], 0
pop esi
ret
mov edx, dword [esp + 0x10]
mov al, byte [edx]
mov ecx, dword [esp + 0xc]
mov byte [ecx + 2], al
mov byte [ecx + 1], al
mov byte [ecx], al
cmp dword [esp + 0x1c], 0x10
jl 0x459aa6
mov cl, byte [edx + 1]
or al, 0xff
sub al, cl
mov ecx, dword [esp + 0x14]
pop edi
mov byte [ecx], al
pop esi
ret
mov al, byte [esp + 0x24]
test al, al
je 0x459aca
movzx dx, byte [edx]
mov eax, dword [esp + 0x30]
cmp dx, word [eax + 8]
mov edx, dword [esp + 0x14]
setne cl
dec ecx
and ecx, 0xff
mov byte [edx], cl
pop edi
pop esi
ret