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

Disassembly:
sub esp, 0x7c
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0xb4]
mov eax, dword [edi + 0x60]
mov dword [esp + 0x50], eax
mov eax, dword [edi + 0x10]
and eax, 0xffffc000
cdq
mov ecx, dword [edi + 0x6c]
and edx, 0x3fff
add eax, edx
sar eax, 0xe
mov dword [esp + 0x20], eax
mov dword [esp + 0x3c], 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 + 0x30], 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 + 0x20]
sar eax, 0xe
mov dword [esp + 0x5c], eax
mov eax, dword [edi + 0x10]
inc edx
shl edx, 0xe
sub edx, eax
mov eax, dword [esp + 0x30]
shl eax, 0xe
sub ecx, eax
add ecx, 0x4000
mov dword [esp + 0x6c], ecx
mov ecx, dword [edi + 0x14]
lea eax, [ebp + 1]
shl eax, 0xe
sub eax, ecx
mov ecx, ebx
shl ecx, 0xe
sub esi, ecx
mov dword [esp + 0x58], ebx
add esi, 0x4000
sub ebx, ebp
cmp ebx, 2
mov dword [esp + 0x28], edx
mov dword [esp + 0x78], esi
jge 0x54034b
mov eax, dword [edi + 0x1c]
sub eax, dword [edi + 0x14]
mov ecx, dword [esp + 0x30]
sub ecx, dword [esp + 0x20]
cmp ecx, 2
jge 0x540366
mov edx, dword [edi + 0x10]
mov ecx, dword [edi + 0x18]
sub ecx, edx
mov dword [esp + 0x28], ecx
mov edx, ecx
mov ebx, dword [edi + 0x44]
mov dword [esp + 0x14], eax
cmp ebp, dword [esp + 0x58]
mov dword [esp + 0x38], ebx
mov dword [esp + 0x40], ebp
jge 0x5409a6
jmp 0x540385
mov edx, dword [esp + 0x28]
mov eax, dword [edi + 8]
mov ecx, dword [esp + 0x20]
imul eax, ebp
mov ebp, dword [edi + 4]
mov esi, dword [edi + 0x40]
add eax, ebp
shl ecx, 2
add eax, ecx
mov dword [esp + 0x10], esi
mov dword [esp + 0x2c], edx
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x14]
imul dword [esp + 0x3c]
shrd eax, edx, 0xe
mov dword [esp + 0x34], eax
mov ebp, dword [esp + 0x34]
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 + 0x18], edx
sar eax, 0xe
mov edx, eax
shl edx, 0xe
sub ebp, edx
lea edx, [ebx + ebp + 0x4000]
mov dword [esp + 0x24], edx
mov edx, eax
sub edx, ecx
cmp edx, 2
mov dword [esp + 0x44], ecx
mov dword [esp + 0x64], edx
jge 0x54041e
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x20]
cmp ecx, dword [esp + 0x30]
mov dword [esp + 0x54], ecx
jge 0x540954
dec eax
mov dword [esp + 0x60], eax
jmp 0x540440
mov esi, dword [esp + 0x10]
jmp 0x540440
mov eax, esi
cdq
and edx, 0x3fff
add edx, eax
mov eax, dword [esp + 0x5c]
sar edx, 0xe
dec eax
cmp edx, eax
mov ebp, 1
jl 0x540472
mov eax, dword [edi + 0x48]
dec eax
or eax, 0x3fff
sub eax, 0x3fff
mov dword [esp + 0x10], eax
xor ebp, ebp
mov esi, eax
xor eax, eax
mov dword [esp + 0x88], eax
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], eax
mov eax, esi
cdq
and edx, 0x3fff
add eax, edx
mov ebx, eax
sar ebx, 0xe
and esi, 0x80003fff
mov dword [esp + 0x7c], 0
jns 0x5404b1
dec esi
or esi, 0xffffc000
inc esi
mov ecx, dword [edi + 0x38]
mov edx, dword [edi + 0x34]
mov dword [esp + 0x4c], ecx
imul ecx, dword [esp + 0x44]
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 + 0x18]
mov edx, dword [esp + 0x7c]
add edx, eax
movzx eax, byte [ecx + ebp*4 + 1]
mov dword [esp + 0x7c], edx
imul eax, esi
movzx edx, byte [ecx + ebx*4 + 1]
imul edx, edi
add eax, edx
cdq
and edx, 0x3fff
add eax, edx
mov edx, dword [esp + 0x80]
sar eax, 0xe
imul eax, dword [esp + 0x18]
add edx, eax
movzx eax, byte [ecx + ebp*4 + 2]
mov dword [esp + 0x80], edx
imul eax, esi
movzx edx, byte [ecx + ebx*4 + 2]
imul edx, edi
add eax, edx
cdq
and edx, 0x3fff
add eax, edx
mov edx, dword [esp + 0x84]
sar eax, 0xe
imul eax, dword [esp + 0x18]
add edx, eax
movzx eax, byte [ecx + ebp*4 + 3]
mov dword [esp + 0x84], edx
imul eax, esi
movzx edx, byte [ecx + ebx*4 + 3]
imul edx, edi
add eax, edx
cdq
and edx, 0x3fff
add eax, edx
mov edx, dword [esp + 0x88]
sar eax, 0xe
imul eax, dword [esp + 0x18]
add edx, eax
mov eax, dword [esp + 0x44]
mov dword [esp + 0x88], edx
mov edx, dword [esp + 0x60]
inc eax
cmp eax, edx
jge 0x54067f
sub edx, eax
mov dword [esp + 0x48], edx
jmp 0x5405b0
add ecx, dword [esp + 0x4c]
movzx eax, byte [ecx + ebp*4]
movzx edx, byte [ecx + ebx*4]
imul eax, esi
imul edx, edi
add eax, edx
cdq
and edx, 0x3fff
add eax, edx
mov edx, dword [esp + 0x7c]
sar eax, 0xe
shl eax, 0xe
add edx, eax
movzx eax, byte [ecx + ebp*4 + 1]
mov dword [esp + 0x7c], edx
imul eax, esi
movzx edx, byte [ecx + ebx*4 + 1]
imul edx, edi
add eax, edx
cdq
and edx, 0x3fff
add eax, edx
mov edx, dword [esp + 0x80]
sar eax, 0xe
shl eax, 0xe
add edx, eax
movzx eax, byte [ecx + ebp*4 + 2]
mov dword [esp + 0x80], edx
imul eax, esi
movzx edx, byte [ecx + ebx*4 + 2]
imul edx, edi
add eax, edx
cdq
and edx, 0x3fff
add eax, edx
mov edx, dword [esp + 0x84]
sar eax, 0xe
shl eax, 0xe
add edx, eax
movzx eax, byte [ecx + ebp*4 + 3]
mov dword [esp + 0x84], edx
imul eax, esi
movzx edx, byte [ecx + ebx*4 + 3]
imul edx, edi
add eax, edx
cdq
and edx, 0x3fff
add eax, edx
mov edx, dword [esp + 0x88]
sar eax, 0xe
shl eax, 0xe
add edx, eax
mov eax, dword [esp + 0x48]
dec eax
mov dword [esp + 0x88], edx
mov dword [esp + 0x48], eax
jne 0x5405b0
cmp dword [esp + 0x64], 1
jle 0x540752
add ecx, dword [esp + 0x4c]
movzx eax, byte [ecx + ebx*4]
movzx edx, byte [ecx + ebp*4]
imul eax, edi
imul edx, esi
add eax, edx
cdq
and edx, 0x3fff
add eax, edx
sar eax, 0xe
imul eax, dword [esp + 0x24]
mov edx, dword [esp + 0x7c]
add edx, eax
movzx eax, byte [ecx + ebp*4 + 1]
imul eax, esi
mov dword [esp + 0x7c], edx
movzx edx, byte [ecx + ebx*4 + 1]
imul edx, edi
add eax, edx
cdq
and edx, 0x3fff
add eax, edx
mov edx, dword [esp + 0x80]
sar eax, 0xe
imul eax, dword [esp + 0x24]
add edx, eax
movzx eax, byte [ecx + ebp*4 + 2]
mov dword [esp + 0x80], edx
imul eax, esi
movzx edx, byte [ecx + ebx*4 + 2]
imul edx, edi
add eax, edx
cdq
and edx, 0x3fff
add eax, edx
mov edx, dword [esp + 0x84]
sar eax, 0xe
imul eax, dword [esp + 0x24]
add edx, eax
movzx eax, byte [ecx + ebp*4 + 3]
movzx ecx, byte [ecx + ebx*4 + 3]
imul eax, esi
imul ecx, edi
add eax, ecx
mov ecx, dword [esp + 0x88]
mov dword [esp + 0x84], edx
cdq
and edx, 0x3fff
add eax, edx
sar eax, 0xe
imul eax, dword [esp + 0x24]
add ecx, eax
mov dword [esp + 0x88], ecx
mov eax, dword [esp + 0x14]
mov edi, 0x4000
cmp eax, edi
jne 0x540769
cmp dword [esp + 0x2c], edi
je 0x5408af
mov eax, dword [esp + 0xbc]
test eax, eax
jne 0x5408af
mov ebp, dword [esp + 0x34]
test ebp, ebp
je 0x5408e7
mov eax, dword [esp + 0x2c]
imul dword [esp + 0x14]
shrd eax, edx, 0xe
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x68]
imul eax, eax, 0xff
cdq
and edx, 0x3fff
add eax, edx
sar eax, 0xe
movzx edi, al
mov eax, dword [esp + 0x7c]
cdq
idiv ebp
mov esi, dword [esp + 0x1c]
movzx ebx, byte [esi]
movzx eax, al
sub eax, ebx
imul eax, edi
add eax, 0x80
mov ecx, eax
sar ecx, 8
add ecx, eax
sar ecx, 8
add ecx, ebx
jns 0x5407da
xor ecx, ecx
jmp 0x5407e7
cmp ecx, 0xff
jle 0x5407e7
mov ecx, 0xff
mov eax, dword [esp + 0x80]
cdq
idiv ebp
movzx ebx, byte [esi + 1]
mov byte [esi], cl
movzx eax, al
sub eax, ebx
imul eax, edi
add eax, 0x80
mov ecx, eax
sar ecx, 8
add ecx, eax
sar ecx, 8
add ecx, ebx
jns 0x540816
xor ecx, ecx
jmp 0x540823
cmp ecx, 0xff
jle 0x540823
mov ecx, 0xff
mov eax, dword [esp + 0x84]
cdq
idiv ebp
movzx ebx, byte [esi + 2]
mov byte [esi + 1], cl
movzx eax, al
sub eax, ebx
imul eax, edi
add eax, 0x80
mov ecx, eax
sar ecx, 8
add ecx, eax
sar ecx, 8
add ecx, ebx
jns 0x540853
xor ecx, ecx
jmp 0x540860
cmp ecx, 0xff
jle 0x540860
mov ecx, 0xff
mov eax, dword [esp + 0x88]
cdq
idiv ebp
movzx ebx, byte [esi + 3]
mov byte [esi + 2], cl
movzx eax, al
sub eax, ebx
imul eax, edi
add eax, 0x80
mov ecx, eax
sar ecx, 8
add ecx, eax
sar ecx, 8
add ecx, ebx
jns 0x540898
xor ecx, ecx
mov byte [esi + 3], cl
mov edi, 0x4000
jmp 0x5408eb
cmp ecx, 0xff
jle 0x5408a5
mov ecx, 0xff
mov byte [esi + 3], cl
mov edi, 0x4000
jmp 0x5408eb
mov eax, dword [esp + 0x7c]
mov esi, dword [esp + 0x3c]
cdq
idiv esi
mov ecx, dword [esp + 0x1c]
mov byte [ecx], al
mov eax, dword [esp + 0x80]
cdq
idiv esi
mov byte [ecx + 1], al
mov eax, dword [esp + 0x84]
cdq
idiv esi
mov byte [ecx + 2], al
mov eax, dword [esp + 0x88]
cdq
idiv esi
mov byte [ecx + 3], al
mov esi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x54]
mov eax, dword [esp + 0x20]
add esi, 4
cmp ecx, eax
mov dword [esp + 0x1c], esi
jne 0x540926
mov edx, dword [esp + 0x6c]
mov dword [esp + 0x2c], edx
mov eax, dword [esp + 0x28]
imul dword [esp + 0x50]
shrd eax, edx, 0xe
mov dword [esp + 0x70], eax
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x70]
add edx, eax
mov dword [esp + 0x10], edx
jmp 0x540938
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x50]
add eax, edx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x30]
mov edi, dword [esp + 0xb4]
inc ecx
cmp ecx, eax
mov dword [esp + 0x54], ecx
jl 0x540437
mov ebx, dword [esp + 0x38]
mov ecx, dword [esp + 0x58]
mov ebp, dword [esp + 0x40]
lea eax, [ecx - 2]
cmp ebp, eax
jne 0x540985
mov eax, dword [esp + 0x14]
imul dword [esp + 0x3c]
shrd eax, edx, 0xe
mov dword [esp + 0x74], eax
add ebx, dword [esp + 0x74]
mov eax, dword [esp + 0x78]
mov dword [esp + 0x38], ebx
mov dword [esp + 0x14], eax
jmp 0x540999
mov edx, dword [esp + 0x34]
add edx, ebx
mov dword [esp + 0x14], 0x4000
mov dword [esp + 0x38], edx
mov ebx, edx
inc ebp
cmp ebp, ecx
mov dword [esp + 0x40], ebp
jl 0x540381
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x7c
ret 0x30