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

Disassembly:
sub esp, 0xa8
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0xe0]
mov eax, dword [edi + 0x60]
mov dword [esp + 0x80], eax
mov eax, dword [edi + 0x10]
and eax, 0xffffc000
mov ecx, dword [edi + 0x6c]
cdq
and edx, 0x3fff
add eax, edx
sar eax, 0xe
mov dword [esp + 0x4c], eax
mov dword [esp + 0x14], ecx
mov ecx, dword [edi + 0x18]
mov esi, dword [edi + 0x1c]
lea eax, [ecx - 1]
or eax, 0x3fff
inc eax
cdq
and edx, 0x3fff
add eax, edx
sar eax, 0xe
mov dword [esp + 0x64], eax
mov eax, dword [edi + 0x14]
and eax, 0xffffc000
cdq
and edx, 0x3fff
add eax, edx
mov ebp, eax
sar ebp, 0xe
lea eax, [esi - 1]
or eax, 0x3fff
inc eax
cdq
and edx, 0x3fff
add eax, edx
mov ebx, eax
mov eax, dword [edi + 0x48]
sar ebx, 0xe
dec eax
or eax, 0x3fff
inc eax
cdq
and edx, 0x3fff
add eax, edx
mov edx, dword [esp + 0x4c]
sar eax, 0xe
mov dword [esp + 0x88], eax
lea eax, [edx + 1]
mov edx, dword [edi + 0x10]
shl eax, 0xe
sub eax, edx
mov edx, dword [esp + 0x64]
shl edx, 0xe
sub ecx, edx
mov edx, dword [edi + 0x14]
add ecx, 0x4000
mov dword [esp + 0x94], ecx
lea ecx, [ebp + 1]
shl ecx, 0xe
sub ecx, edx
mov edx, ebx
shl edx, 0xe
sub esi, edx
mov dword [esp + 0x7c], ebx
add esi, 0x4000
sub ebx, ebp
cmp ebx, 2
mov dword [esp + 0x58], eax
mov dword [esp + 0xac], esi
jge 0x540aac
mov ecx, dword [edi + 0x1c]
sub ecx, dword [edi + 0x14]
mov edx, dword [esp + 0x64]
sub edx, dword [esp + 0x4c]
cmp edx, 2
jge 0x540ac3
mov eax, dword [edi + 0x18]
sub eax, dword [edi + 0x10]
mov dword [esp + 0x58], eax
mov ebx, dword [edi + 0x44]
mov dword [esp + 0x18], ecx
cmp ebp, dword [esp + 0x7c]
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], ebp
jge 0x54120e
jmp 0x540ae2
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x4c]
mov esi, dword [edi + 0x40]
mov dword [esp + 0x60], eax
mov eax, dword [edi + 8]
imul eax, ebp
add eax, dword [edi + 4]
shl ecx, 2
add eax, ecx
mov dword [esp + 0x48], esi
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x18]
imul dword [esp + 0x14]
shrd eax, edx, 0xe
mov dword [esp + 0x54], eax
mov ebp, dword [esp + 0x54]
mov eax, ebx
and eax, 0xffffc000
cdq
and edx, 0x3fff
add eax, edx
mov ecx, eax
sar ecx, 0xe
lea eax, [ebx + ebp - 1]
or eax, 0x3fff
inc eax
cdq
and edx, 0x3fff
add eax, edx
lea edx, [ecx + 1]
shl edx, 0xe
sub edx, ebx
mov dword [esp + 0x44], edx
sar eax, 0xe
mov edx, eax
shl edx, 0xe
sub ebp, edx
lea edx, [ebx + ebp + 0x4000]
mov dword [esp + 0x5c], edx
mov edx, eax
sub edx, ecx
cmp edx, 2
mov dword [esp + 0x74], ecx
mov dword [esp + 0x90], edx
jge 0x540b7c
mov ecx, dword [esp + 0x54]
mov dword [esp + 0x44], ecx
mov ecx, dword [esp + 0x4c]
cmp ecx, dword [esp + 0x64]
mov dword [esp + 0x78], ecx
jge 0x5411b9
dec eax
mov dword [esp + 0xb4], eax
mov eax, esi
cdq
and edx, 0x3fff
add edx, eax
mov eax, dword [esp + 0x88]
sar edx, 0xe
dec eax
cmp edx, eax
mov ebp, 1
jl 0x540bcb
mov esi, dword [edi + 0x48]
dec esi
or esi, 0x3fff
sub esi, 0x3fff
mov dword [esp + 0x48], esi
xor ebp, ebp
xor eax, eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov eax, esi
cdq
and edx, 0x3fff
add eax, edx
mov ebx, eax
sar ebx, 0xe
and esi, 0x80003fff
jns 0x540c15
dec esi
or esi, 0xffffc000
inc esi
mov ecx, dword [edi + 0x38]
mov edx, dword [edi + 0x34]
mov dword [esp + 0x50], ecx
imul ecx, dword [esp + 0x74]
add ecx, edx
movzx eax, byte [ecx + ebx*4]
add ebp, ebx
movzx edx, byte [ecx + ebp*4]
imul edx, esi
mov edi, 0x4000
sub edi, esi
imul eax, edi
add eax, edx
cdq
and edx, 0x3fff
add eax, edx
sar eax, 0xe
imul eax, dword [esp + 0x44]
cdq
mov dword [esp + 0x10], ebp
mov ebp, dword [esp + 0x1c]
add ebp, eax
mov eax, dword [esp + 0x20]
adc eax, edx
mov edx, dword [esp + 0x10]
movzx edx, byte [ecx + edx*4 + 1]
mov dword [esp + 0x20], eax
imul edx, esi
movzx eax, byte [ecx + ebx*4 + 1]
imul eax, edi
add eax, edx
cdq
and edx, 0x3fff
add eax, edx
sar eax, 0xe
imul eax, dword [esp + 0x44]
cdq
mov dword [esp + 0x1c], ebp
mov ebp, dword [esp + 0x24]
add ebp, eax
mov eax, dword [esp + 0x28]
adc eax, edx
mov edx, dword [esp + 0x10]
movzx edx, byte [ecx + edx*4 + 2]
mov dword [esp + 0x28], eax
imul edx, esi
movzx eax, byte [ecx + ebx*4 + 2]
imul eax, edi
add eax, edx
cdq
and edx, 0x3fff
add eax, edx
sar eax, 0xe
imul eax, dword [esp + 0x44]
cdq
mov dword [esp + 0x24], ebp
mov ebp, dword [esp + 0x2c]
add ebp, eax
mov eax, dword [esp + 0x30]
adc eax, edx
mov edx, dword [esp + 0x10]
movzx edx, byte [ecx + edx*4 + 3]
mov dword [esp + 0x30], eax
imul edx, esi
movzx eax, byte [ecx + ebx*4 + 3]
imul eax, edi
add eax, edx
cdq
and edx, 0x3fff
add eax, edx
sar eax, 0xe
imul eax, dword [esp + 0x44]
cdq
mov dword [esp + 0x2c], ebp
mov ebp, dword [esp + 0x34]
add ebp, eax
adc dword [esp + 0x38], edx
mov eax, dword [esp + 0x74]
mov dword [esp + 0x34], ebp
mov edx, dword [esp + 0xb4]
inc eax
cmp eax, edx
jge 0x540e33
sub edx, eax
mov dword [esp + 0x84], edx
add ecx, dword [esp + 0x50]
mov edx, dword [esp + 0x10]
movzx edx, byte [ecx + edx*4]
movzx eax, byte [ecx + ebx*4]
imul edx, esi
imul eax, edi
add eax, edx
cdq
mov ebp, dword [esp + 0x1c]
and edx, 0x3fff
add eax, edx
sar eax, 0xe
shl eax, 0xe
cdq
add ebp, eax
mov eax, dword [esp + 0x20]
adc eax, edx
mov edx, dword [esp + 0x10]
movzx edx, byte [ecx + edx*4 + 1]
mov dword [esp + 0x20], eax
imul edx, esi
movzx eax, byte [ecx + ebx*4 + 1]
imul eax, edi
add eax, edx
cdq
and edx, 0x3fff
add eax, edx
sar eax, 0xe
shl eax, 0xe
cdq
mov dword [esp + 0x1c], ebp
mov ebp, dword [esp + 0x24]
add ebp, eax
mov eax, dword [esp + 0x28]
adc eax, edx
movzx edx, byte [ecx + ebx*4 + 2]
mov dword [esp + 0x28], eax
imul edx, edi
mov eax, dword [esp + 0x10]
movzx eax, byte [ecx + eax*4 + 2]
imul eax, esi
add eax, edx
cdq
and edx, 0x3fff
add eax, edx
sar eax, 0xe
shl eax, 0xe
cdq
mov dword [esp + 0x24], ebp
mov ebp, dword [esp + 0x2c]
add ebp, eax
mov eax, dword [esp + 0x30]
adc eax, edx
mov edx, dword [esp + 0x10]
movzx edx, byte [ecx + edx*4 + 3]
mov dword [esp + 0x30], eax
imul edx, esi
movzx eax, byte [ecx + ebx*4 + 3]
imul eax, edi
add eax, edx
cdq
and edx, 0x3fff
add eax, edx
sar eax, 0xe
shl eax, 0xe
mov dword [esp + 0x2c], ebp
mov ebp, dword [esp + 0x34]
cdq
add ebp, eax
mov eax, dword [esp + 0x84]
mov dword [esp + 0x34], ebp
mov ebp, dword [esp + 0x38]
adc ebp, edx
dec eax
mov dword [esp + 0x38], ebp
mov dword [esp + 0x84], eax
jne 0x540d34
cmp dword [esp + 0x90], 1
jle 0x540f33
add ecx, dword [esp + 0x50]
movzx eax, byte [ecx + ebx*4]
imul eax, edi
mov edx, dword [esp + 0x10]
movzx edx, byte [ecx + edx*4]
imul edx, esi
add eax, edx
cdq
and edx, 0x3fff
add eax, edx
sar eax, 0xe
imul eax, dword [esp + 0x5c]
mov ebp, dword [esp + 0x1c]
cdq
add ebp, eax
mov eax, dword [esp + 0x20]
adc eax, edx
mov edx, dword [esp + 0x10]
movzx edx, byte [ecx + edx*4 + 1]
mov dword [esp + 0x20], eax
imul edx, esi
movzx eax, byte [ecx + ebx*4 + 1]
imul eax, edi
add eax, edx
cdq
and edx, 0x3fff
add eax, edx
sar eax, 0xe
imul eax, dword [esp + 0x5c]
cdq
mov dword [esp + 0x1c], ebp
mov ebp, dword [esp + 0x24]
add ebp, eax
mov eax, dword [esp + 0x28]
adc eax, edx
mov edx, dword [esp + 0x10]
movzx edx, byte [ecx + edx*4 + 2]
mov dword [esp + 0x28], eax
imul edx, esi
movzx eax, byte [ecx + ebx*4 + 2]
imul eax, edi
add eax, edx
cdq
and edx, 0x3fff
add eax, edx
sar eax, 0xe
imul eax, dword [esp + 0x5c]
cdq
mov dword [esp + 0x24], ebp
mov ebp, dword [esp + 0x2c]
add ebp, eax
movzx eax, byte [ecx + ebx*4 + 3]
mov dword [esp + 0x2c], ebp
mov ebp, dword [esp + 0x30]
adc ebp, edx
imul eax, edi
mov edx, dword [esp + 0x10]
movzx ecx, byte [ecx + edx*4 + 3]
imul ecx, esi
add eax, ecx
mov ecx, dword [esp + 0x34]
cdq
and edx, 0x3fff
add eax, edx
sar eax, 0xe
imul eax, dword [esp + 0x5c]
cdq
add ecx, eax
mov eax, dword [esp + 0x38]
adc eax, edx
mov dword [esp + 0x30], ebp
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x18]
mov ebx, 0x4000
cmp eax, ebx
jne 0x540f4a
cmp dword [esp + 0x60], ebx
je 0x5410ce
mov eax, dword [esp + 0xe8]
test eax, eax
jne 0x5410ce
mov edi, dword [esp + 0x54]
test edi, edi
je 0x541147
mov eax, dword [esp + 0x60]
imul dword [esp + 0x18]
shrd eax, edx, 0xe
mov dword [esp + 0xb0], eax
mov eax, dword [esp + 0xb0]
mov esi, dword [esp + 0x68]
imul eax, eax, 0xff
mov bl, byte [esi]
cdq
and edx, 0x3fff
add eax, edx
mov ecx, eax
mov eax, edi
cdq
mov ebp, edx
push ebp
mov edi, eax
mov eax, dword [esp + 0x24]
sar ecx, 0xe
movzx edx, bl
push edi
movzx ebx, cl
mov ecx, dword [esp + 0x24]
push eax
push ecx
mov dword [esp + 0x60], edx
call fcn.005c4520
mov edx, dword [esp + 0x50]
movzx eax, al
sub eax, edx
imul eax, ebx
add eax, 0x80
mov ecx, eax
sar ecx, 8
add ecx, eax
sar ecx, 8
add ecx, edx
jns 0x540fde
xor ecx, ecx
jmp 0x540feb
cmp ecx, 0xff
jle 0x540feb
mov ecx, 0xff
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
push ebp
push edi
push edx
push eax
mov byte [esi], cl
call fcn.005c4520
movzx edx, byte [esi + 1]
movzx eax, al
sub eax, edx
imul eax, ebx
add eax, 0x80
mov ecx, eax
sar ecx, 8
add ecx, eax
sar ecx, 8
add ecx, edx
jns 0x541021
xor ecx, ecx
jmp 0x54102e
cmp ecx, 0xff
jle 0x54102e
mov ecx, 0xff
mov edx, dword [esp + 0x2c]
push ebp
mov byte [esi + 1], cl
mov ecx, dword [esp + 0x34]
push edi
push ecx
push edx
call fcn.005c4520
movzx edx, byte [esi + 2]
movzx eax, al
sub eax, edx
imul eax, ebx
add eax, 0x80
mov ecx, eax
sar ecx, 8
add ecx, eax
sar ecx, 8
add ecx, edx
jns 0x541065
xor ecx, ecx
jmp 0x541072
cmp ecx, 0xff
jle 0x541072
mov ecx, 0xff
mov eax, dword [esp + 0x38]
push ebp
push edi
mov byte [esi + 2], cl
mov ecx, dword [esp + 0x3c]
push eax
push ecx
call fcn.005c4520
movzx edx, byte [esi + 3]
movzx eax, al
sub eax, edx
imul eax, ebx
add eax, 0x80
mov ecx, eax
sar ecx, 8
add ecx, eax
sar ecx, 8
add ecx, edx
jns 0x5410b4
xor ecx, ecx
mov byte [esi + 3], cl
mov ebx, 0x4000
jmp 0x54114b
cmp ecx, 0xff
jle 0x5410c1
mov ecx, 0xff
mov byte [esi + 3], cl
mov ebx, 0x4000
jmp 0x54114b
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
idiv dword [esp + 0x14]
mov dword [esp + 0x98], eax
mov dl, byte [esp + 0x98]
mov esi, dword [esp + 0x68]
mov byte [esi], dl
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
idiv dword [esp + 0x14]
mov dword [esp + 0xa8], eax
mov al, byte [esp + 0xa8]
mov byte [esi + 1], al
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
idiv dword [esp + 0x14]
mov dword [esp + 0xa0], eax
mov cl, byte [esp + 0xa0]
mov byte [esi + 2], cl
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
idiv dword [esp + 0x14]
mov dword [esp + 0x8c], eax
mov dl, byte [esp + 0x8c]
mov byte [esi + 3], dl
jmp 0x54114b
mov esi, dword [esp + 0x68]
mov ecx, dword [esp + 0x78]
mov eax, dword [esp + 0x4c]
add esi, 4
cmp ecx, eax
mov dword [esp + 0x68], esi
jne 0x541188
mov eax, dword [esp + 0x94]
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x58]
imul dword [esp + 0x80]
shrd eax, edx, 0xe
mov dword [esp + 0x9c], eax
mov eax, dword [esp + 0x9c]
jmp 0x541193
mov eax, dword [esp + 0x80]
mov dword [esp + 0x60], ebx
mov esi, dword [esp + 0x48]
mov edi, dword [esp + 0xe0]
add esi, eax
mov eax, dword [esp + 0x64]
inc ecx
cmp ecx, eax
mov dword [esp + 0x48], esi
mov dword [esp + 0x78], ecx
jl 0x540b96
mov ebx, dword [esp + 0x6c]
mov ecx, dword [esp + 0x7c]
mov ebp, dword [esp + 0x70]
lea eax, [ecx - 2]
cmp ebp, eax
jne 0x5411ef
mov eax, dword [esp + 0x18]
imul dword [esp + 0x14]
shrd eax, edx, 0xe
mov dword [esp + 0xa4], eax
mov edx, dword [esp + 0xac]
mov eax, dword [esp + 0xa4]
mov dword [esp + 0x18], edx
jmp 0x5411fb
mov eax, dword [esp + 0x54]
mov dword [esp + 0x18], 0x4000
add ebx, eax
inc ebp
cmp ebp, ecx
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], ebp
jl 0x540ade
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa8
ret 0x30