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

Disassembly:
sub esp, 0x4c
push ebx
mov ebx, dword [esp + 0x54]
push ebp
push esi
push edi
mov eax, dword [ebx + 0xd8]
mov ecx, dword [ebx + 0xac]
mov ebp, dword [ebx + 0xd4]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x48], eax
mov dword [esp + 0x34], ebp
test al, 1
jne 0x502c92
test byte [esp + 0x7c], 1
jne 0x502c92
mov dword [esp + 0x28], 1
jmp 0x502c97
and dword [esp + 0x28], 0
mov eax, dword [esp + 0x74]
mov esi, dword [esp + 0x6c]
add eax, esi
mov edx, dword [ebx + 0x80]
cmp eax, edx
jle 0x502cb3
mov eax, edx
sub eax, esi
mov dword [esp + 0x74], eax
mov eax, dword [esp + 0x78]
mov edi, dword [esp + 0x70]
add eax, edi
mov esi, dword [ebx + 0x84]
cmp eax, esi
jle 0x502ccf
mov eax, esi
sub eax, edi
mov dword [esp + 0x78], eax
cmp dword [esp + 0x74], 0
jle 0x503d66
mov eax, dword [esp + 0x6c]
add eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x10]
js 0x503d66
mov eax, dword [esp + 0x78]
add eax, edi
js 0x503d66
mov eax, dword [esp + 0x6c]
cmp eax, edx
jge 0x503d66
cmp edi, esi
jge 0x503d66
test eax, eax
jns 0x502d16
mov edx, eax
neg edx
jmp 0x502d18
xor edx, edx
mov dword [esp + 0x3c], edx
test edi, edi
jns 0x502d26
mov esi, edi
neg esi
jmp 0x502d28
xor esi, esi
mov dword [esp + 0x14], esi
cmp esi, dword [esp + 0x78]
jge 0x503d66
fld qword [0x533028]
add eax, edx
fld dword [0x533020]
fld1
mov dword [esp + 0x40], eax
imul eax, edx, 3
mov dword [esp + 0x24], 0xff
mov dword [esp + 0x44], eax
cmp dword [ebx + 0xe8], 0
je 0x502d6f
mov eax, dword [ebx + 0x84]
sub eax, esi
sub eax, edi
dec eax
jmp 0x502d72
lea eax, [esi + edi]
mov edi, dword [ebx + 0xcc]
imul edi, eax
mov eax, dword [esp + 0x40]
imul eax, ebp
mov ebp, esi
imul ebp, dword [esp + 0x68]
mov dword [esp + 0x30], edx
add edi, eax
mov eax, dword [esp + 0x74]
add ebp, dword [esp + 0x44]
add edi, dword [ebx + 0xc8]
add ebp, dword [esp + 0x64]
cmp edx, eax
jge 0x503d47
jmp 0x502dad
fxch st(1)
cmp dword [ebx + 0xe0], 0
je 0x502ded
mov eax, dword [esp + 0x70]
fstp st(1)
add eax, esi
fstp st(1)
push eax
mov eax, dword [esp + 0x70]
fstp st(0)
add eax, edx
push eax
push ebx
call fcn.00502819
fld qword [0x533028]
mov ecx, eax
fld1
add esp, 0xc
fld dword [0x533020]
fxch st(1)
mov eax, dword [esp + 0x74]
mov dword [esp + 0x10], ecx
cmp dword [ebx + 0xe4], 0
je 0x502ef7
movzx ecx, byte [ebp + 1]
fstp st(1)
movzx edx, byte [ebp + 2]
fstp st(0)
add edx, ecx
mov eax, dword [esp + 0x10]
movzx ecx, byte [ebp]
add edx, ecx
sar eax, 0x18
mov dword [esp + 0x7c], edx
and eax, 0xff
fild dword [esp + 0x7c]
fstp dword [esp + 0x7c]
fdivr dword [esp + 0x7c]
fstp dword [esp + 0x7c]
fld dword [esp + 0x7c]
mov dword [esp + 0x7c], eax
fild dword [esp + 0x7c]
fstp dword [esp + 0x7c]
fmul dword [esp + 0x7c]
call fcn.00454490
mov ecx, dword [esp + 0x10]
mov edx, eax
shl edx, 0x18
and ecx, 0xffffff
or edx, ecx
cmp dword [ebx + 0xd4], 4
jne 0x502eb1
movzx ecx, byte [edi + 3]
movzx eax, byte [edi]
shl ecx, 8
or ecx, eax
movzx eax, byte [edi + 1]
shl ecx, 8
or ecx, eax
movzx eax, byte [edi + 2]
shl ecx, 8
or ecx, eax
mov eax, dword [esp + 0x70]
push ecx
add eax, esi
push edx
push eax
mov eax, dword [esp + 0x78]
add eax, dword [esp + 0x3c]
push eax
call dword [ebx + 0xb8]
mov ecx, eax
mov byte [edi + 2], al
sar ecx, 8
mov byte [edi + 1], cl
mov ecx, eax
sar ecx, 0x10
mov byte [edi], cl
sar eax, 0x18
jmp 0x50335b
movzx ecx, byte [edi]
movzx eax, byte [edi + 1]
or ecx, 0xffffff00
shl ecx, 8
or ecx, eax
movzx eax, byte [edi + 2]
shl ecx, 8
or ecx, eax
mov eax, dword [esp + 0x70]
push ecx
add eax, esi
push edx
push eax
mov eax, dword [esp + 0x78]
add eax, dword [esp + 0x3c]
push eax
call dword [ebx + 0xb8]
mov ecx, eax
mov byte [edi + 2], al
sar ecx, 8
mov byte [edi + 1], cl
sar eax, 0x10
jmp 0x50346a
mov edx, dword [esp + 0x48]
test dl, 2
je 0x502f75
movzx eax, byte [ebp + 1]
fstp st(0)
movzx ecx, byte [ebp + 2]
add ecx, eax
movzx eax, byte [ebp]
add ecx, eax
mov dword [esp + 0x7c], ecx
fild dword [esp + 0x7c]
mov ecx, dword [esp + 0x10]
fstp dword [esp + 0x7c]
fld dword [esp + 0x7c]
fdivrp st(2)
fxch st(1)
fstp dword [esp + 0x7c]
fcomp dword [esp + 0x7c]
fnstsw ax
test ah, 5
jp 0x502f4b
xor byte [edi + 2], cl
mov eax, ecx
sar eax, 8
xor byte [edi + 1], al
mov eax, ecx
sar eax, 0x10
jmp 0x502f6e
cmp dword [esp + 0x28], 0
je 0x503b6b
mov al, byte [ebx + 0x104]
xor byte [edi + 2], al
mov al, byte [ebx + 0x108]
xor byte [edi + 1], al
mov al, byte [ebx + 0x10c]
xor byte [edi], al
jmp 0x503b6b
test dword [ebx + 0xd8], 0x100
fstp st(1)
je 0x5032ab
mov edx, ecx
fstp st(0)
sar edx, 0x18
and edx, 0xff
cmp dword [esp + 0x28], 0
mov dword [esp + 0x2c], edx
mov dword [esp + 0x7c], edx
je 0x50328d
mov esi, dword [ebx + 0x110]
mov dword [esp + 0x20], esi
cmp esi, 0xc0
jl 0x503137
movzx eax, byte [ebp + 2]
imul eax, edx
cdq
idiv dword [esp + 0x24]
mov dword [esp + 0x38], eax
test eax, eax
jne 0x502fd9
mov eax, dword [ebx + 0x104]
jmp 0x503016
test esi, esi
jne 0x502fe2
movzx eax, cl
jmp 0x503016
movzx ecx, cl
mov edx, 0xff
imul ecx, dword [esp + 0x38]
sub edx, eax
mov eax, dword [ebx + 0x104]
imul edx, esi
imul ecx, ecx, 0xff
imul eax, edx
add eax, ecx
imul ecx, dword [esp + 0x38], 0xff
add ecx, edx
cdq
idiv ecx
mov ecx, dword [esp + 0x10]
mov esi, dword [esp + 0x2c]
mov byte [edi + 2], al
movzx eax, byte [ebp + 1]
imul eax, esi
cdq
idiv dword [esp + 0x24]
mov dword [esp + 0x38], eax
test eax, eax
jne 0x503039
mov eax, dword [ebx + 0x108]
jmp 0x50308b
cmp dword [ebx + 0x110], 0
jne 0x503050
mov eax, ecx
mov ecx, 0xff
sar eax, 8
and eax, ecx
jmp 0x503090
mov edx, 0xff
sub edx, eax
mov eax, ecx
imul edx, dword [ebx + 0x110]
mov ecx, dword [ebx + 0x108]
sar eax, 8
and eax, 0xff
imul eax, dword [esp + 0x38]
imul ecx, edx
imul eax, eax, 0xff
add eax, ecx
imul ecx, dword [esp + 0x38], 0xff
add ecx, edx
cdq
idiv ecx
mov ecx, 0xff
mov byte [edi + 1], al
movzx eax, byte [ebp]
imul eax, esi
cdq
idiv ecx
mov esi, eax
test esi, esi
jne 0x5030ab
mov eax, dword [ebx + 0x10c]
jmp 0x5030ef
mov eax, dword [ebx + 0x110]
test eax, eax
jne 0x5030c0
mov eax, dword [esp + 0x10]
sar eax, 0x10
and eax, ecx
jmp 0x5030ef
mov edx, ecx
sub edx, esi
imul edx, eax
mov eax, dword [esp + 0x10]
sar eax, 0x10
and eax, ecx
mov ecx, dword [ebx + 0x10c]
imul eax, esi
imul ecx, edx
imul eax, eax, 0xff
add eax, ecx
imul ecx, esi, 0xff
add ecx, edx
cdq
idiv ecx
mov byte [edi], al
movzx eax, byte [ebp + 2]
movzx ecx, byte [ebp]
add ecx, eax
movzx eax, byte [ebp + 1]
add ecx, eax
mov dword [esp + 0x38], ecx
fild dword [esp + 0x38]
fstp dword [esp + 0x38]
fdivr dword [esp + 0x38]
fild dword [esp + 0x7c]
fstp qword [esp + 0x54]
fmul qword [esp + 0x54]
call fcn.00454490
mov esi, 0xff
mov edx, esi
sub edx, eax
imul edx, dword [ebx + 0x110]
jmp 0x503b55
movzx eax, byte [ebp + 1]
movzx ecx, byte [ebp + 2]
add ecx, eax
movzx eax, byte [ebp]
add ecx, eax
mov dword [esp + 0x38], ecx
fild dword [esp + 0x38]
fstp dword [esp + 0x38]
fdivr dword [esp + 0x38]
fild dword [esp + 0x7c]
fstp qword [esp + 0x54]
fmul qword [esp + 0x54]
call fcn.00454490
mov esi, eax
test esi, esi
jne 0x503176
mov ecx, dword [ebx + 0x104]
jmp 0x5031b9
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x503187
mov eax, dword [esp + 0x10]
movzx ecx, al
jmp 0x5031bd
mov ecx, dword [esp + 0x10]
mov edx, 0xff
movzx ecx, cl
sub edx, esi
imul edx, eax
mov eax, dword [ebx + 0x104]
imul ecx, esi
imul eax, edx
imul ecx, ecx, 0xff
add eax, ecx
imul ecx, esi, 0xff
add ecx, edx
cdq
idiv ecx
mov ecx, eax
mov eax, dword [esp + 0x10]
mov byte [edi + 2], cl
test esi, esi
jne 0x5031cc
mov eax, dword [ebx + 0x108]
jmp 0x503210
mov ecx, dword [ebx + 0x110]
sar eax, 8
test ecx, ecx
jne 0x5031e2
mov ecx, 0xff
and eax, ecx
jmp 0x503215
and eax, 0xff
mov edx, 0xff
sub edx, esi
imul eax, esi
imul edx, ecx
mov ecx, dword [ebx + 0x108]
imul eax, eax, 0xff
imul ecx, edx
add eax, ecx
imul ecx, esi, 0xff
add ecx, edx
cdq
idiv ecx
mov ecx, 0xff
mov byte [edi + 1], al
test esi, esi
jne 0x503224
mov eax, dword [ebx + 0x10c]
jmp 0x503268
mov eax, dword [ebx + 0x110]
test eax, eax
jne 0x503239
mov eax, dword [esp + 0x10]
sar eax, 0x10
and eax, ecx
jmp 0x503268
mov edx, ecx
sub edx, esi
imul edx, eax
mov eax, dword [esp + 0x10]
sar eax, 0x10
and eax, ecx
mov ecx, dword [ebx + 0x10c]
imul eax, esi
imul ecx, edx
imul eax, eax, 0xff
add eax, ecx
imul ecx, esi, 0xff
add ecx, edx
cdq
idiv ecx
mov byte [edi], al
mov eax, 0xff
sub eax, esi
imul ecx, esi, 0xff
imul eax, dword [ebx + 0x110]
add eax, ecx
mov ecx, 0xff
cdq
idiv ecx
jmp 0x503b60
mov eax, ecx
mov byte [edi + 2], cl
sar eax, 8
mov byte [edi + 1], al
mov eax, ecx
sar eax, 0x10
mov byte [edi], al
mov byte [edi + 3], dl
mov eax, dword [esp + 0x74]
jmp 0x503d03
test dl, 8
je 0x503363
cmp dword [esp + 0x34], 4
jne 0x503d01
movzx eax, byte [ebp + 1]
movzx ecx, byte [ebp + 2]
add ecx, eax
movzx eax, byte [ebp]
add ecx, eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x7c], ecx
fild dword [esp + 0x7c]
sar eax, 0x18
and eax, 0xff
cmp dword [esp + 0x28], 0
fstp dword [esp + 0x7c]
fld dword [esp + 0x7c]
fdivrp st(2)
fxch st(1)
fstp dword [esp + 0x7c]
je 0x503324
fld dword [esp + 0x7c]
fld st(0)
mov dword [esp + 0x7c], eax
fsubp st(2)
fild dword [ebx + 0x110]
fstp qword [esp + 0x54]
fld qword [esp + 0x54]
fmulp st(2)
fild dword [esp + 0x7c]
fstp dword [esp + 0x7c]
fmul dword [esp + 0x7c]
jmp 0x503354
mov dword [esp + 0x38], eax
fild dword [esp + 0x38]
fstp dword [esp + 0x38]
fld dword [esp + 0x38]
fld dword [esp + 0x7c]
movzx eax, byte [edi + 3]
fld st(0)
fmulp st(2)
mov dword [esp + 0x7c], eax
fsubp st(2)
fild dword [esp + 0x7c]
fstp qword [esp + 0x54]
fld qword [esp + 0x54]
fmulp st(2)
faddp st(1)
call fcn.004544c6
mov byte [edi + 3], al
jmp 0x50346c
mov eax, edx
fstp st(0)
and eax, 0x10
mov dword [esp + 0x38], eax
jne 0x503475
test dl, 0x20
jne 0x503475
movzx edx, byte [ebp + 2]
mov eax, 0xff
sub eax, edx
fstp st(0)
cmp dword [esp + 0x28], 0
je 0x5033fa
imul eax, dword [ebx + 0x104]
movzx ecx, cl
imul ecx, edx
add eax, ecx
mov ecx, 0xff
cdq
idiv ecx
mov byte [edi + 2], al
mov eax, ecx
movzx edx, byte [ebp + 1]
mov ecx, dword [esp + 0x10]
sub eax, edx
imul eax, dword [ebx + 0x108]
sar ecx, 8
and ecx, 0xff
imul ecx, edx
add eax, ecx
mov ecx, 0xff
cdq
idiv ecx
mov byte [edi + 1], al
mov eax, ecx
mov ecx, dword [esp + 0x10]
movzx edx, byte [ebp]
sar ecx, 0x10
sub eax, edx
imul eax, dword [ebx + 0x10c]
and ecx, 0xff
imul ecx, edx
add eax, ecx
jmp 0x503462
movzx ecx, byte [edi + 2]
imul eax, ecx
mov ecx, dword [esp + 0x10]
movzx ecx, cl
imul ecx, edx
add eax, ecx
mov ecx, 0xff
cdq
idiv ecx
mov edx, 0xff
mov byte [edi + 2], al
mov eax, dword [esp + 0x10]
movzx ecx, byte [ebp + 1]
sar eax, 8
and eax, edx
sub edx, ecx
imul eax, ecx
movzx ecx, byte [edi + 1]
imul edx, ecx
mov ecx, 0xff
add eax, edx
cdq
idiv ecx
mov edx, 0xff
mov byte [edi + 1], al
mov eax, dword [esp + 0x10]
movzx ecx, byte [ebp]
sar eax, 0x10
and eax, edx
sub edx, ecx
imul eax, ecx
movzx ecx, byte [edi]
imul edx, ecx
add eax, edx
cdq
mov ecx, 0xff
idiv ecx
mov byte [edi], al
mov ecx, dword [esp + 0x10]
jmp 0x503b6b
cmp dword [esp + 0x28], 0
je 0x50390b
mov esi, dword [ebx + 0x110]
cmp esi, 0xc0
jl 0x50362e
movzx eax, byte [ebp + 2]
mov edx, ecx
sar edx, 0x18
and edx, 0xff
mov dword [esp + 0x54], eax
imul eax, edx
mov dword [esp + 0x20], edx
mov dword [esp + 0x7c], edx
cdq
idiv dword [esp + 0x24]
mov dword [esp + 0x2c], eax
test eax, eax
jne 0x5034c5
mov eax, dword [ebx + 0x104]
jmp 0x503502
test esi, esi
jne 0x5034ce
movzx eax, cl
jmp 0x503502
movzx ecx, cl
mov edx, 0xff
imul ecx, dword [esp + 0x2c]
sub edx, eax
mov eax, dword [ebx + 0x104]
imul edx, esi
imul ecx, ecx, 0xff
imul eax, edx
add eax, ecx
imul ecx, dword [esp + 0x2c], 0xff
add ecx, edx
cdq
idiv ecx
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x18], eax
movzx eax, byte [ebp + 1]
mov dword [esp + 0x50], eax
imul eax, dword [esp + 0x20]
cdq
idiv dword [esp + 0x24]
mov dword [esp + 0x2c], eax
test eax, eax
jne 0x503528
mov ecx, dword [ebx + 0x108]
jmp 0x503535
test esi, esi
jne 0x50353b
sar ecx, 8
and ecx, 0xff
mov dword [esp + 0x1c], ecx
jmp 0x503576
mov edx, 0xff
sub edx, eax
mov eax, ecx
mov ecx, dword [ebx + 0x108]
sar eax, 8
and eax, 0xff
imul edx, esi
imul eax, dword [esp + 0x2c]
imul ecx, edx
imul eax, eax, 0xff
add eax, ecx
imul ecx, dword [esp + 0x2c], 0xff
add ecx, edx
cdq
idiv ecx
mov dword [esp + 0x1c], eax
movzx eax, byte [ebp]
mov ecx, 0xff
mov dword [esp + 0x4c], eax
imul eax, dword [esp + 0x20]
cdq
idiv ecx
mov ecx, eax
mov dword [esp + 0x2c], ecx
test ecx, ecx
jne 0x50359d
mov eax, dword [ebx + 0x10c]
jmp 0x5035d8
mov eax, dword [esp + 0x10]
sar eax, 0x10
and eax, 0xff
test esi, esi
je 0x5035d8
imul eax, ecx
mov edx, 0xff
sub edx, ecx
mov ecx, dword [ebx + 0x10c]
imul edx, esi
imul eax, eax, 0xff
imul ecx, edx
add eax, ecx
imul ecx, dword [esp + 0x2c], 0xff
add ecx, edx
cdq
idiv ecx
mov ecx, dword [esp + 0x50]
add ecx, dword [esp + 0x4c]
add ecx, dword [esp + 0x54]
mov dword [esp + 0x54], ecx
fild dword [esp + 0x54]
mov dword [esp + 0x20], eax
fstp dword [esp + 0x54]
fdivr dword [esp + 0x54]
fild dword [esp + 0x7c]
fstp qword [esp + 0x54]
fmul qword [esp + 0x54]
call fcn.00454490
mov edx, 0xff
sub edx, eax
imul eax, eax, 0xff
imul edx, esi
mov esi, 0xff
add eax, edx
cdq
idiv esi
mov edx, eax
mov dword [esp + 0x2c], edx
jmp 0x5037a4
movzx eax, byte [ebp + 1]
movzx ecx, byte [ebp + 2]
add ecx, eax
movzx eax, byte [ebp]
add ecx, eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x7c], ecx
fild dword [esp + 0x7c]
sar eax, 0x18
and eax, 0xff
fstp dword [esp + 0x7c]
fld dword [esp + 0x7c]
mov dword [esp + 0x7c], eax
fild dword [esp + 0x7c]
fstp dword [esp + 0x7c]
fmul dword [esp + 0x7c]
fdivrp st(1)
call fcn.00454490
mov ecx, eax
mov dword [esp + 0x7c], ecx
test ecx, ecx
jne 0x50369a
mov eax, dword [ebx + 0x104]
mov dword [esp + 0x18], eax
mov eax, dword [ebx + 0x108]
mov dword [esp + 0x1c], eax
mov eax, dword [ebx + 0x10c]
jmp 0x50377e
test esi, esi
jne 0x5036ab
mov eax, dword [esp + 0x10]
movzx edx, al
mov dword [esp + 0x18], edx
jmp 0x5036eb
mov eax, dword [ebx + 0x104]
mov edx, 0xff
sub edx, ecx
mov ecx, dword [esp + 0x10]
movzx ecx, cl
imul ecx, dword [esp + 0x7c]
imul edx, esi
imul ecx, ecx, 0xff
imul eax, edx
add eax, ecx
imul ecx, dword [esp + 0x7c], 0xff
add ecx, edx
cdq
idiv ecx
mov ecx, dword [esp + 0x7c]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x10]
mov edx, 0xff
test esi, esi
jne 0x503701
mov ecx, eax
sar ecx, 8
and ecx, edx
mov dword [esp + 0x1c], ecx
jmp 0x50373c
sar eax, 8
sub edx, ecx
and eax, 0xff
imul edx, esi
imul eax, ecx
mov ecx, dword [ebx + 0x108]
imul ecx, edx
imul eax, eax, 0xff
add eax, ecx
imul ecx, dword [esp + 0x7c], 0xff
add ecx, edx
cdq
idiv ecx
mov edx, 0xff
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x10]
sar eax, 0x10
test esi, esi
jne 0x50374b
mov ecx, dword [esp + 0x7c]
and eax, edx
jmp 0x503783
sub edx, dword [esp + 0x7c]
and eax, 0xff
imul eax, dword [esp + 0x7c]
mov ecx, dword [ebx + 0x10c]
imul edx, esi
imul eax, eax, 0xff
imul ecx, edx
add eax, ecx
imul ecx, dword [esp + 0x7c], 0xff
add ecx, edx
cdq
idiv ecx
mov ecx, dword [esp + 0x7c]
mov edx, 0xff
mov dword [esp + 0x20], eax
mov eax, edx
sub eax, ecx
imul ecx, ecx, 0xff
imul eax, esi
mov esi, 0xff
add eax, ecx
cdq
idiv esi
mov edx, eax
mov dword [esp + 0x2c], eax
cmp dword [esp + 0x34], 3
jne 0x5037fa
movzx eax, byte [edi + 2]
mov ecx, esi
mov esi, dword [esp + 0x18]
sub ecx, edx
imul eax, ecx
imul esi, edx
add eax, esi
mov esi, 0xff
cdq
idiv esi
mov edx, dword [esp + 0x1c]
imul edx, dword [esp + 0x2c]
mov byte [edi + 2], al
movzx eax, byte [edi + 1]
imul eax, ecx
add eax, edx
cdq
idiv esi
mov byte [edi + 1], al
movzx eax, byte [edi]
imul eax, ecx
mov ecx, dword [esp + 0x20]
imul ecx, dword [esp + 0x2c]
add eax, ecx
mov ecx, esi
jmp 0x5039a4
movzx ecx, byte [edi + 3]
mov dword [esp + 0x7c], ecx
test edx, edx
jne 0x50380c
movzx eax, byte [edi + 2]
jmp 0x503849
test ecx, ecx
jne 0x503816
mov eax, dword [esp + 0x18]
jmp 0x503849
movzx eax, byte [edi + 2]
sub esi, edx
imul eax, esi
imul esi, dword [esp + 0x7c]
imul eax, ecx
mov ecx, dword [esp + 0x18]
imul ecx, edx
imul ecx, ecx, 0xff
add eax, ecx
imul ecx, edx, 0xff
cdq
add esi, ecx
mov ecx, dword [esp + 0x7c]
idiv esi
mov edx, dword [esp + 0x2c]
mov byte [edi + 2], al
test edx, edx
jne 0x503856
movzx eax, byte [edi + 1]
jmp 0x503894
test ecx, ecx
jne 0x503860
mov eax, dword [esp + 0x1c]
jmp 0x503894
movzx eax, byte [edi + 1]
mov esi, 0xff
sub esi, edx
imul eax, esi
imul esi, dword [esp + 0x7c]
imul eax, ecx
mov ecx, dword [esp + 0x1c]
imul ecx, edx
imul ecx, ecx, 0xff
add eax, ecx
imul ecx, edx, 0xff
cdq
add esi, ecx
idiv esi
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x7c]
mov byte [edi + 1], al
test edx, edx
jne 0x5038a4
movzx eax, byte [edi]
jmp 0x5038e5
test ecx, ecx
jne 0x5038ae
mov eax, dword [esp + 0x20]
jmp 0x5038e5
movzx eax, byte [edi]
mov esi, 0xff
sub esi, edx
imul eax, esi
imul esi, dword [esp + 0x7c]
imul eax, ecx
mov ecx, dword [esp + 0x20]
imul ecx, edx
imul ecx, ecx, 0xff
add eax, ecx
imul ecx, edx, 0xff
cdq
add esi, ecx
mov ecx, dword [esp + 0x7c]
idiv esi
mov edx, dword [esp + 0x2c]
cmp dword [esp + 0x38], 0
mov byte [edi], al
je 0x503b63
mov esi, 0xff
mov eax, esi
sub eax, edx
imul eax, ecx
imul ecx, edx, 0xff
add eax, ecx
jmp 0x503b5d
cmp dword [esp + 0x34], 3
jne 0x5039ae
movzx eax, byte [ebp + 2]
mov esi, ecx
sar esi, 0x18
mov ecx, 0xff
and esi, ecx
fstp st(0)
imul eax, esi
cdq
idiv ecx
mov edx, ecx
movzx ecx, byte [edi + 2]
sub edx, eax
imul edx, ecx
mov ecx, dword [esp + 0x10]
movzx ecx, cl
imul eax, ecx
mov ecx, 0xff
add eax, edx
cdq
idiv ecx
mov byte [edi + 2], al
movzx eax, byte [ebp + 1]
imul eax, esi
cdq
idiv ecx
mov edx, ecx
movzx ecx, byte [edi + 1]
sub edx, eax
imul edx, ecx
mov ecx, dword [esp + 0x10]
sar ecx, 8
and ecx, 0xff
imul eax, ecx
mov ecx, 0xff
add eax, edx
cdq
idiv ecx
mov byte [edi + 1], al
movzx eax, byte [ebp]
imul eax, esi
mov esi, dword [esp + 0x10]
sar esi, 0x10
and esi, ecx
cdq
idiv ecx
mov edx, ecx
imul esi, eax
sub edx, eax
movzx eax, byte [edi]
imul eax, edx
add eax, esi
cdq
idiv ecx
mov byte [edi], al
jmp 0x503b63
mov al, byte [edi + 3]
mov byte [esp + 0x7c], al
cmp al, 0xc0
jb 0x503b74
movzx esi, al
mov edx, ecx
movzx eax, byte [ebp + 2]
sar edx, 0x18
and edx, 0xff
mov dword [esp + 0x2c], esi
imul eax, edx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x7c], edx
cdq
idiv dword [esp + 0x24]
mov dword [esp + 0x20], eax
test eax, eax
jne 0x5039f1
movzx eax, byte [edi + 2]
jmp 0x503a37
test esi, esi
jne 0x5039fa
movzx eax, cl
jmp 0x503a37
mov esi, 0xff
movzx ecx, cl
imul ecx, dword [esp + 0x20]
sub esi, eax
movzx eax, byte [edi + 2]
imul eax, esi
imul esi, dword [esp + 0x2c]
imul ecx, ecx, 0xff
imul eax, dword [esp + 0x2c]
add eax, ecx
imul ecx, dword [esp + 0x20], 0xff
cdq
add esi, ecx
mov ecx, dword [esp + 0x10]
idiv esi
mov esi, dword [esp + 0x2c]
mov byte [edi + 2], al
movzx eax, byte [ebp + 1]
imul eax, dword [esp + 0x1c]
cdq
idiv dword [esp + 0x24]
mov dword [esp + 0x20], eax
test eax, eax
jne 0x503a56
movzx eax, byte [edi + 1]
jmp 0x503a9e
test esi, esi
mov esi, 0xff
jne 0x503a68
mov eax, ecx
sar eax, 8
and eax, esi
jmp 0x503aa3
sub esi, eax
sar ecx, 8
movzx eax, byte [edi + 1]
and ecx, 0xff
imul ecx, dword [esp + 0x20]
imul eax, esi
imul esi, dword [esp + 0x2c]
imul ecx, ecx, 0xff
imul eax, dword [esp + 0x2c]
add eax, ecx
imul ecx, dword [esp + 0x20], 0xff
cdq
add esi, ecx
idiv esi
mov esi, 0xff
mov byte [edi + 1], al
movzx eax, byte [ebp]
imul eax, dword [esp + 0x1c]
cdq
idiv esi
mov dword [esp + 0x20], eax
test eax, eax
jne 0x503abf
movzx eax, byte [edi]
jmp 0x503b0a
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x10]
test edx, edx
jne 0x503ad4
mov eax, ecx
sar eax, 0x10
and eax, esi
jmp 0x503b0e
sub esi, eax
sar ecx, 0x10
movzx eax, byte [edi]
and ecx, 0xff
imul ecx, dword [esp + 0x20]
imul eax, esi
imul esi, edx
imul ecx, ecx, 0xff
imul eax, edx
add eax, ecx
imul ecx, dword [esp + 0x20], 0xff
cdq
add esi, ecx
idiv esi
mov esi, 0xff
mov ecx, dword [esp + 0x10]
cmp dword [esp + 0x38], 0
mov byte [edi], al
je 0x503cf8
movzx eax, byte [ebp + 2]
movzx ecx, byte [ebp]
add ecx, eax
movzx eax, byte [ebp + 1]
add ecx, eax
mov dword [esp + 0x54], ecx
fild dword [esp + 0x54]
fstp dword [esp + 0x54]
fdivr dword [esp + 0x54]
fild dword [esp + 0x7c]
fstp qword [esp + 0x54]
fmul qword [esp + 0x54]
call fcn.00454490
mov edx, esi
sub edx, eax
imul edx, dword [esp + 0x2c]
imul eax, eax, 0xff
add eax, edx
cdq
idiv esi
mov byte [edi + 3], al
mov ecx, dword [esp + 0x10]
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x74]
jmp 0x503d05
movzx eax, byte [ebp + 1]
mov esi, 0xff
movzx ecx, byte [ebp + 2]
add ecx, eax
movzx eax, byte [ebp]
add ecx, eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x54], ecx
fild dword [esp + 0x54]
sar eax, 0x18
and eax, esi
fstp dword [esp + 0x54]
fld dword [esp + 0x54]
mov dword [esp + 0x54], eax
fild dword [esp + 0x54]
fstp dword [esp + 0x54]
fmul dword [esp + 0x54]
fdivrp st(1)
call fcn.00454490
mov edx, eax
movzx eax, byte [esp + 0x7c]
mov dword [esp + 0x20], edx
mov dword [esp + 0x7c], eax
test edx, edx
jne 0x503bd6
movzx ecx, byte [edi + 2]
mov dword [esp + 0x2c], ecx
jmp 0x503c1f
mov ecx, dword [esp + 0x10]
test eax, eax
jne 0x503be7
movzx ebx, cl
mov dword [esp + 0x2c], ebx
jmp 0x503c23
movzx eax, byte [edi + 2]
sub esi, edx
imul eax, esi
imul esi, dword [esp + 0x7c]
movzx ecx, cl
imul ecx, edx
imul eax, dword [esp + 0x7c]
imul ecx, ecx, 0xff
add eax, ecx
imul ecx, edx, 0xff
cdq
add esi, ecx
idiv esi
mov edx, dword [esp + 0x20]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x7c]
mov ecx, dword [esp + 0x10]
mov ebx, dword [esp + 0x2c]
mov byte [edi + 2], bl
mov ebx, 0xff
test edx, edx
jne 0x503c39
movzx eax, byte [edi + 1]
jmp 0x503c7a
test eax, eax
jne 0x503c46
mov eax, ecx
sar eax, 8
and eax, ebx
jmp 0x503c7a
movzx eax, byte [edi + 1]
mov esi, ebx
sar ecx, 8
sub esi, edx
imul eax, esi
and ecx, ebx
imul esi, dword [esp + 0x7c]
imul ecx, edx
imul eax, dword [esp + 0x7c]
imul ecx, ecx, 0xff
add eax, ecx
imul ecx, edx, 0xff
cdq
add esi, ecx
idiv esi
mov edx, dword [esp + 0x20]
mov byte [edi + 1], al
test edx, edx
jne 0x503c86
movzx eax, byte [edi]
jmp 0x503cd0
mov ecx, dword [esp + 0x7c]
test ecx, ecx
jne 0x503c9b
mov ecx, dword [esp + 0x10]
mov eax, ecx
sar eax, 0x10
and eax, ebx
jmp 0x503cd4
movzx eax, byte [edi]
mov esi, ebx
sub esi, edx
imul eax, esi
imul esi, dword [esp + 0x7c]
imul eax, ecx
mov ecx, dword [esp + 0x10]
sar ecx, 0x10
and ecx, ebx
imul ecx, edx
imul ecx, ecx, 0xff
add eax, ecx
imul ecx, edx, 0xff
cdq
add esi, ecx
idiv esi
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x10]
cmp dword [esp + 0x38], 0
mov ebx, dword [esp + 0x60]
mov byte [edi], al
je 0x503b67
mov esi, 0xff
mov eax, esi
sub eax, edx
imul eax, dword [esp + 0x7c]
jmp 0x5038fe
mov esi, dword [esp + 0x14]
jmp 0x5032a2
fstp st(1)
fstp st(0)
mov edx, dword [esp + 0x30]
add ebp, 3
add edi, dword [ebx + 0xd4]
inc edx
fld qword [0x533028]
fld1
fld dword [0x533020]
mov dword [esp + 0x30], edx
cmp edx, eax
jl 0x502dab
mov edx, dword [esp + 0x3c]
fstp st(0)
fstp st(1)
fstp st(0)
fld qword [0x533028]
fld1
fld dword [0x533020]
fxch st(1)
mov ebp, dword [ebx + 0xd4]
inc esi
mov edi, dword [esp + 0x70]
mov dword [esp + 0x14], esi
cmp esi, dword [esp + 0x78]
jl 0x502d59
fstp st(1)
fstp st(1)
fstp st(0)
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret 0x20