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

Disassembly:
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
sub esp, 0x98
push ebx
push ebp
mov ebp, dword [esp + 0xa8]
push esi
push edi
mov edi, dword [esp + 0xac]
cmp dword [edi + 4], 0
mov ebx, edx
je 0x582f5b
test ebp, ebp
je 0x582f5b
test ebx, ebx
je 0x582f5b
test eax, eax
je 0x582f5b
test ecx, ecx
je 0x582f5b
cmp byte [edi + 0x182], 0
je 0x582f5b
test eax, eax
jge 0x582ee7
mov eax, dword [edi + 0xc]
mov dword [esp + 0xbc], eax
test ecx, ecx
jge 0x582ef5
mov ecx, dword [edi + 0x10]
mov dword [esp + 0xc0], ecx
cmp dword [edi + 0x14c], 0
push ebp
setge byte [esp + 0x32]
cmp dword [edi + 0x1bc], 0
setne byte [esp + 0x33]
call dword [sym.imp.GDI32.dll_SaveDC]
mov esi, eax
xor eax, eax
test esi, esi
mov dword [esp + 0x90], esi
je 0x582f5d
lea edx, [esp + 0x64]
push edx
push 0x18
push ebx
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], eax
call dword [sym.imp.GDI32.dll_GetObjectW]
test eax, eax
jne 0x582f6a
push esi
push ebp
call dword [sym.imp.GDI32.dll_RestoreDC]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x98
ret 0x1c
mov eax, dword [esp + 0x70]
mov ecx, eax
and ecx, reloc.WS2_32.dll_closesocket
jns 0x582f7d
dec ecx
or ecx, 0xfffffffc
inc ecx
je 0x582f98
nop
add eax, 1
mov edx, eax
and edx, reloc.WS2_32.dll_closesocket
jns 0x582f92
dec edx
or edx, 0xfffffffc
inc edx
jne 0x582f80
mov dword [esp + 0x70], eax
mov esi, dword [esp + 0xb8]
mov ebx, dword [esp + 0x6c]
xor eax, eax
test esi, esi
setl al
sub eax, 1
and eax, esi
cmp ebx, eax
jge 0x582fbc
mov dword [esp + 0x84], ebx
jmp 0x582fcf
xor eax, eax
test esi, esi
setl al
sub eax, 1
and eax, esi
mov dword [esp + 0x84], eax
mov ebp, dword [esp + 0xb4]
mov eax, dword [esp + 0x68]
xor ecx, ecx
test ebp, ebp
setl cl
sub ecx, 1
and ecx, ebp
cmp eax, ecx
jge 0x582ff3
mov dword [esp + 0x80], eax
jmp 0x583006
xor ecx, ecx
test ebp, ebp
setl cl
sub ecx, 1
and ecx, ebp
mov dword [esp + 0x80], ecx
mov edx, dword [esp + 0xbc]
lea ecx, [edx + ebp]
cmp eax, ecx
mov edx, eax
jl 0x583018
mov edx, ecx
test edx, edx
jge 0x583020
xor eax, eax
jmp 0x583026
cmp eax, ecx
jl 0x583026
mov eax, ecx
mov ecx, dword [esp + 0xc0]
add esi, ecx
cmp ebx, esi
mov ecx, ebx
jl 0x583037
mov ecx, esi
test ecx, ecx
jge 0x58303f
xor esi, esi
jmp 0x583045
cmp ebx, esi
jge 0x583045
mov esi, ebx
sub eax, dword [esp + 0x80]
mov ebp, esi
sub ebp, dword [esp + 0x84]
test eax, eax
mov dword [esp + 0x50], eax
jle 0x582f5b
test ebp, ebp
jle 0x582f5b
cmp dword [esp + 0xbc], 0
jle 0x582f5b
cmp dword [esp + 0xc0], 0
jle 0x582f5b
cmp byte [esp + 0x2e], 0
jne 0x583327
cmp byte [esp + 0x2f], 0
jne 0x583327
cmp byte [edi + 0x181], 0
jne 0x583327
cmp dword [esp + 0x78], 0
je 0x583ba0
fild dword [edi + 0xc]
mov ebx, dword [edi + 0x10]
mov dword [esp + 0x38], ebx
mov edx, esi
fidiv dword [esp + 0xbc]
sub edx, dword [esp + 0xb8]
fstp dword [esp + 0x24]
fild dword [esp + 0x38]
mov dword [esp + 0x38], edx
fidiv dword [esp + 0xc0]
fstp dword [esp + 0x44]
fild dword [esp + 0x38]
fld dword [esp + 0x44]
fld st(0)
fmulp st(2)
fxch st(1)
call fcn.005f4400
sub ebx, eax
test ebp, ebp
mov dword [esp + 0x38], ebx
fild dword [esp + 0x38]
fstp dword [esp + 0x30]
jle 0x583b9e
mov ecx, dword [esp + 0xb4]
lea eax, [ecx*4]
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x80]
sub eax, ecx
mov dword [esp + 0x38], eax
fild dword [esp + 0x38]
fld dword [esp + 0x24]
neg esi
fld st(0)
mov dword [esp + 0x1c], esi
fmulp st(2)
mov dword [esp + 0x3c], ebp
fxch st(1)
fstp dword [esp + 0x38]
fld1
fld qword [0x640688]
fld dword [esp + 0x30]
fld st(0)
call fcn.005f4400
fld dword [esp + 0x38]
mov edx, dword [esp + 0x1c]
fstp dword [esp + 0x28]
mov ebx, dword [edi + 0x30]
xor ecx, ecx
test eax, eax
setl cl
sub ecx, 1
and ecx, eax
mov eax, dword [esp + 0x6c]
lea ebp, [edx + eax]
imul ebp, dword [esp + 0x70]
add ebp, dword [esp + 0x5c]
mov esi, ecx
add ebp, dword [esp + 0x78]
imul ebx, esi
add ebx, dword [edi + 0x34]
cmp dword [esp + 0x50], 0
jle 0x583309
mov ecx, dword [esp + 0x50]
mov dword [esp + 0x54], ecx
fld dword [esp + 0x28]
fld st(0)
call fcn.005f4400
xor ecx, ecx
test eax, eax
setl cl
sub ecx, 1
and ecx, eax
cmp byte [esp + 0xc4], 0
je 0x58327c
fxch st(4)
fcom st(3)
fnstsw ax
test ah, 0x41
jne 0x583220
fxch st(3)
fcomp st(5)
fnstsw ax
test ah, 5
jp 0x583228
push 2
fxch st(4)
sub esp, 0x10
fstp dword [esp + 0xc]
lea edx, [esp + 0x5c]
fxch st(1)
fstp dword [esp + 8]
fsub st(2), st(0)
fxch st(2)
fstp dword [esp + 0x54]
fld dword [esp + 0x54]
fstp dword [esp + 4]
fsubrp st(1)
fstp dword [esp + 0x54]
fld dword [esp + 0x54]
fstp dword [esp]
push edx
call fcn.0053f780
mov eax, dword [eax]
mov dword [esp + 0x14], eax
jmp 0x583264
fstp st(0)
fstp st(4)
fstp st(1)
jmp 0x58322e
fstp st(2)
fstp st(3)
fxch st(2)
fsub st(2), st(0)
push 2
fxch st(2)
sub esp, 8
lea ecx, [esp + 0x88]
fstp dword [esp + 0x4c]
fld dword [esp + 0x4c]
fstp dword [esp + 4]
fsubrp st(1)
fstp dword [esp + 0x4c]
fld dword [esp + 0x4c]
fstp dword [esp]
push ecx
push edi
call fcn.0053d630
mov edx, dword [eax]
mov dword [esp + 0x14], edx
fld dword [esp + 0x30]
fld dword [esp + 0x28]
fld dword [esp + 0x44]
fld dword [esp + 0x24]
fld qword [0x640688]
jmp 0x5832c3
cmp dword [edi + 0x28], 0
fstp st(3)
je 0x58329f
mov eax, edi
call fcn.00530420
mov ecx, edi
push eax
lea eax, [esp + 0x38]
call fcn.005303c0
mov eax, dword [eax]
mov dword [esp + 0x14], eax
jmp 0x5832bb
lea eax, [ebx + ecx*2]
add eax, ecx
mov cl, byte [eax]
mov dl, byte [eax + 1]
add eax, 1
mov al, byte [eax + 1]
mov byte [esp + 0x14], cl
mov byte [esp + 0x15], dl
mov byte [esp + 0x16], al
fxch st(4)
fxch st(2)
fxch st(3)
fxch st(1)
mov cl, byte [esp + 0x14]
fld st(1)
mov dl, byte [esp + 0x15]
faddp st(4)
mov al, byte [esp + 0x16]
fxch st(3)
mov byte [ebp], cl
add ebp, 1
fstp dword [esp + 0x28]
fld1
mov byte [ebp], dl
add ebp, 1
fxch st(2)
mov byte [ebp], al
fxch st(4)
add ebp, 1
fxch st(1)
mov byte [ebp], 0xff
fxch st(3)
add ebp, 1
fxch st(1)
sub dword [esp + 0x54], 1
jne 0x5831a5
mov eax, 1
fadd st(4)
add dword [esp + 0x1c], eax
sub dword [esp + 0x3c], eax
fstp dword [esp + 0x30]
jne 0x583150
jmp 0x583b98
lea eax, [esp + 0x38]
mov ecx, edi
mov byte [esp + 0x18], 0
mov byte [esp + 0x19], 0
mov byte [esp + 0x1a], 0
mov byte [esp + 0x1b], 0
call fcn.0052fe20
cmp dword [esp + 0x78], 0
mov ecx, dword [edi + 0x14c]
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], 0
je 0x583ba0
mov eax, dword [edi + 0xc]
cmp dword [esp + 0xbc], eax
mov dword [esp + 0x34], eax
jne 0x583670
mov eax, dword [edi + 0x10]
cmp dword [esp + 0xc0], eax
jne 0x583670
sub eax, esi
add eax, dword [esp + 0xb8]
test ebp, ebp
mov edx, eax
mov dword [esp + 0x3c], edx
jle 0x583ba0
mov ecx, dword [esp + 0xb4]
mov eax, dword [esp + 0x80]
sub eax, ecx
mov dword [esp + 0x34], eax
lea eax, [ecx*4]
neg esi
mov dword [esp + 0x5c], eax
mov dword [esp + 0x4c], esi
mov dword [esp + 0x20], ebp
jmp 0x5833d4
mov ebx, dword [esp + 0x6c]
mov eax, dword [edi + 0xc]
mov ecx, dword [esp + 0x34]
imul eax, edx
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x4c]
lea ebp, [eax + ebx]
imul ebp, dword [esp + 0x70]
mov eax, dword [edi + 0x30]
add ebp, dword [esp + 0x5c]
imul eax, edx
add ebp, dword [esp + 0x78]
mov dword [esp + 0x28], ecx
lea ecx, [ecx + ecx*2]
add eax, ecx
add eax, dword [edi + 0x34]
cmp dword [esp + 0x50], 0
mov dword [esp + 0x58], eax
jle 0x583652
mov eax, dword [esp + 0x50]
mov dword [esp + 0x60], eax
nop
cmp byte [esp + 0x2f], 0
je 0x58343c
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x28]
add ecx, eax
mov eax, dword [edi + 0x1bc]
mov al, byte [ecx + eax]
jmp 0x58343e
or al, 0xff
movzx ebx, byte [edi + 0x180]
add ebx, 1
movzx ecx, al
imul ebx, ecx
sar ebx, 8
cmp dword [edi + 0x28], 0
je 0x58349b
mov ecx, dword [esp + 0x28]
mov esi, edx
mov eax, edi
call fcn.00530420
movzx eax, al
mov dword [esp + 0x44], eax
push eax
lea eax, [esp + 0x4c]
mov ecx, edi
call fcn.005303c0
cmp byte [edi + 0x181], 0
mov eax, dword [eax]
mov dword [esp + 0x18], eax
je 0x5834c5
mov edx, eax
shr edx, 0x18
movzx ecx, bl
add edx, 1
imul edx, ecx
sar edx, 8
mov bl, dl
jmp 0x5834c5
mov eax, dword [esp + 0x58]
movzx edx, byte [eax]
mov cl, byte [eax + 1]
add eax, 1
add eax, 1
mov byte [esp + 0x18], dl
movzx edx, byte [eax]
add eax, 1
mov byte [esp + 0x19], cl
mov byte [esp + 0x1a], dl
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x18]
cmp dword [edi + 0x28], 0
je 0x5834d5
mov eax, dword [esp + 0x40]
cmp dword [esp + 0x44], eax
jmp 0x5834d9
cmp eax, dword [esp + 0x38]
jne 0x5834e6
cmp byte [esp + 0x2e], 0
jne 0x583638
test bl, bl
je 0x583638
cmp bl, 0xff
jne 0x58351c
mov cl, byte [esp + 0x18]
mov dl, byte [esp + 0x19]
mov al, byte [esp + 0x1a]
mov byte [ebp], cl
add ebp, 1
mov byte [ebp], dl
add ebp, 1
mov byte [ebp], al
add ebp, 1
mov byte [ebp], bl
add ebp, 1
jmp 0x58363b
movzx edx, byte [ebp + 1]
movzx eax, byte [ebp]
xor ecx, ecx
mov ch, byte [ebp + 3]
mov cl, byte [ebp + 2]
shl ecx, 8
or ecx, edx
xor edx, edx
mov dh, bl
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x1a]
mov dword [esp + 0x14], ecx
or edx, eax
movzx eax, byte [esp + 0x19]
shl edx, 8
or edx, eax
movzx eax, byte [esp + 0x18]
shl edx, 8
or edx, eax
mov dword [esp + 0x24], edx
mov al, byte [esp + 0x27]
test al, al
je 0x583635
cmp al, 0xff
jne 0x583574
mov ecx, edx
jmp 0x583635
mov bl, byte [esp + 0x17]
movzx eax, al
movzx esi, bl
mov ecx, esi
imul ecx, eax
mov dword [esp + 0x30], eax
mov eax, 0x80808081
imul ecx
add edx, ecx
sar edx, 7
mov eax, edx
shr eax, 0x1f
add eax, edx
sub bl, al
add bl, byte [esp + 0x27]
mov byte [esp + 0x13], bl
je 0x58362d
movzx edx, byte [esp + 0x14]
movzx eax, bl
shl eax, 8
mov dword [esp + 0x1c], eax
movzx eax, byte [esp + 0x24]
imul eax, dword [esp + 0x30]
mov ebx, edx
imul edx, ecx
imul ebx, esi
add eax, ebx
shl eax, 8
sub eax, edx
cdq
idiv dword [esp + 0x1c]
movzx edx, byte [esp + 0x15]
mov ebx, edx
imul edx, ecx
imul ebx, esi
mov byte [esp + 0x14], al
movzx eax, byte [esp + 0x25]
imul eax, dword [esp + 0x30]
add eax, ebx
shl eax, 8
sub eax, edx
cdq
idiv dword [esp + 0x1c]
movzx edx, byte [esp + 0x16]
mov ebx, edx
imul edx, ecx
imul ebx, esi
mov byte [esp + 0x15], al
movzx eax, byte [esp + 0x26]
imul eax, dword [esp + 0x30]
add eax, ebx
shl eax, 8
sub eax, edx
cdq
idiv dword [esp + 0x1c]
mov bl, byte [esp + 0x13]
mov byte [esp + 0x16], al
mov byte [esp + 0x17], bl
mov ecx, dword [esp + 0x14]
mov dword [ebp], ecx
add ebp, 4
mov edx, dword [esp + 0x3c]
mov eax, 1
add dword [esp + 0x28], eax
sub dword [esp + 0x60], eax
jne 0x583420
mov eax, 1
add dword [esp + 0x4c], eax
add edx, eax
sub dword [esp + 0x20], eax
mov dword [esp + 0x3c], edx
jne 0x5833d0
jmp 0x583ba0
fild dword [esp + 0x34]
mov ecx, esi
sub ecx, dword [esp + 0xb8]
test ebp, ebp
fidiv dword [esp + 0xbc]
fstp dword [esp + 0x28]
fild dword [edi + 0x10]
fstp dword [esp + 0x34]
fld dword [esp + 0x34]
mov dword [esp + 0x34], ecx
fld st(0)
fidiv dword [esp + 0xc0]
fstp dword [esp + 0x30]
fild dword [esp + 0x34]
fld dword [esp + 0x30]
fld st(0)
fmulp st(2)
fxch st(2)
fsubrp st(1)
fstp dword [esp + 0x24]
jle 0x583b9e
mov ecx, dword [esp + 0xb4]
mov eax, dword [esp + 0x80]
sub eax, ecx
mov dword [esp + 0x34], eax
fild dword [esp + 0x34]
fld dword [esp + 0x28]
lea edx, [ecx*4]
fld st(0)
neg esi
fmulp st(2)
mov dword [esp + 0x5c], edx
fxch st(1)
mov dword [esp + 0x4c], esi
mov dword [esp + 0x58], ebp
fstp dword [esp + 0x34]
fld1
fld qword [0x640688]
fldz
fld dword [esp + 0x24]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 5
jp 0x58371c
xor esi, esi
mov dword [esp + 0x3c], esi
jmp 0x583729
fld st(0)
call fcn.005f4400
mov dword [esp + 0x3c], eax
mov esi, eax
mov eax, dword [edi + 0xc]
fld dword [esp + 0x34]
mov ecx, dword [esp + 0x6c]
imul eax, esi
fstp dword [esp + 0x1c]
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x4c]
lea ebp, [eax + ecx]
imul ebp, dword [esp + 0x70]
mov eax, dword [edi + 0x30]
add ebp, dword [esp + 0x5c]
imul eax, esi
add eax, dword [edi + 0x34]
add ebp, dword [esp + 0x78]
cmp dword [esp + 0x50], 0
mov dword [esp + 0x7c], eax
jle 0x583b7f
mov edx, dword [esp + 0x50]
mov dword [esp + 0x60], edx
fldz
fld dword [esp + 0x1c]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 5
jp 0x583788
xor ebx, ebx
jmp 0x583791
fld st(0)
call fcn.005f4400
mov ebx, eax
cmp byte [esp + 0x2f], 0
je 0x5837aa
mov eax, dword [esp + 0x54]
mov edx, dword [edi + 0x1bc]
lea ecx, [ebx + eax]
mov al, byte [ecx + edx]
jmp 0x5837ac
or al, 0xff
movzx ecx, byte [edi + 0x180]
add ecx, 1
movzx eax, al
imul ecx, eax
sar ecx, 8
cmp dword [edi + 0x28], 0
mov byte [esp + 0x13], cl
je 0x5838e5
mov ecx, ebx
mov eax, edi
call fcn.00530420
cmp byte [esp + 0xc4], 0
movzx ecx, al
mov dword [esp + 0x44], ecx
je 0x583894
fxch st(4)
fcom st(3)
fnstsw ax
test ah, 0x41
jne 0x583854
fxch st(3)
fcomp st(5)
fnstsw ax
test ah, 5
jp 0x58385c
push 2
fxch st(4)
sub esp, 0x10
fstp dword [esp + 0xc]
lea edx, [esp + 0xb0]
fxch st(1)
fstp dword [esp + 8]
fsub st(2), st(0)
fxch st(2)
fstp dword [esp + 0x34]
fld dword [esp + 0x34]
fstp dword [esp + 4]
fsubrp st(1)
fstp dword [esp + 0x34]
fld dword [esp + 0x34]
fstp dword [esp]
push edx
call fcn.0053f780
fld dword [esp + 0x24]
fld dword [esp + 0x1c]
fld dword [esp + 0x30]
fld dword [esp + 0x28]
fld qword [0x640688]
jmp 0x5838b6
fstp st(0)
fstp st(4)
fstp st(1)
jmp 0x583862
fstp st(2)
fstp st(3)
fxch st(2)
fsub st(2), st(0)
push 2
fxch st(2)
sub esp, 8
lea eax, [esp + 0xa0]
fstp dword [esp + 0x2c]
fld dword [esp + 0x2c]
fstp dword [esp + 4]
fsubrp st(1)
fstp dword [esp + 0x2c]
fld dword [esp + 0x2c]
fstp dword [esp]
push eax
push edi
call fcn.0053d630
jmp 0x58383c
fstp st(3)
mov ecx, ebx
mov eax, edi
call fcn.00530420
mov ecx, edi
push eax
lea eax, [esp + 0xa8]
call fcn.005303c0
fxch st(4)
fxch st(2)
fxch st(3)
fxch st(1)
cmp byte [edi + 0x181], 0
mov eax, dword [eax]
mov dword [esp + 0x18], eax
je 0x5839a0
movzx edx, byte [esp + 0x13]
mov ecx, eax
shr ecx, 0x18
add ecx, 1
imul ecx, edx
sar ecx, 8
mov byte [esp + 0x13], cl
jmp 0x5839d6
cmp byte [esp + 0xc4], 0
je 0x5839a6
fxch st(4)
fcom st(3)
fnstsw ax
test ah, 0x41
jne 0x583946
fxch st(3)
fcomp st(5)
fnstsw ax
test ah, 5
jp 0x58394e
push 2
fxch st(4)
sub esp, 0x10
fstp dword [esp + 0xc]
lea eax, [esp + 0xb4]
fxch st(1)
fstp dword [esp + 8]
fsub st(2), st(0)
fxch st(2)
fstp dword [esp + 0x34]
fld dword [esp + 0x34]
fstp dword [esp + 4]
fsubrp st(1)
fstp dword [esp + 0x34]
fld dword [esp + 0x34]
fstp dword [esp]
push eax
call fcn.0053f780
jmp 0x583984
fstp st(0)
fstp st(4)
fstp st(1)
jmp 0x583954
fstp st(2)
fstp st(3)
fxch st(2)
fsub st(2), st(0)
push 2
fxch st(2)
sub esp, 8
lea ecx, [esp + 0xa4]
fstp dword [esp + 0x2c]
fld dword [esp + 0x2c]
fstp dword [esp + 4]
fsubrp st(1)
fstp dword [esp + 0x2c]
fld dword [esp + 0x2c]
fstp dword [esp]
push ecx
push edi
call fcn.0053d630
fld dword [esp + 0x24]
mov eax, dword [eax]
fld dword [esp + 0x1c]
mov dword [esp + 0x18], eax
fld dword [esp + 0x30]
fld dword [esp + 0x28]
fld qword [0x640688]
mov cl, byte [esp + 0x13]
jmp 0x5839d6
mov edx, dword [esp + 0x7c]
fstp st(3)
lea eax, [edx + ebx*2]
fxch st(4)
movzx edx, byte [eax + ebx]
fxch st(2)
add eax, ebx
fxch st(3)
add eax, 1
fxch st(1)
mov byte [esp + 0x18], dl
movzx edx, byte [eax]
mov al, byte [eax + 1]
mov byte [esp + 0x19], dl
mov byte [esp + 0x1a], al
mov eax, dword [esp + 0x18]
cmp dword [edi + 0x28], 0
je 0x5839e6
mov edx, dword [esp + 0x44]
cmp edx, dword [esp + 0x40]
jmp 0x5839ea
cmp eax, dword [esp + 0x38]
jne 0x5839f7
cmp byte [esp + 0x2e], 0
jne 0x583b5b
test cl, cl
je 0x583b5b
cmp cl, 0xff
jne 0x583a2e
mov al, byte [esp + 0x18]
mov cl, byte [esp + 0x19]
mov dl, byte [esp + 0x1a]
mov byte [ebp], al
add ebp, 1
mov byte [ebp], cl
add ebp, 1
mov byte [ebp], dl
add ebp, 1
mov byte [ebp], 0xff
add ebp, 1
jmp 0x583b5e
movzx edx, byte [ebp + 1]
xor eax, eax
mov ah, byte [ebp + 3]
mov al, byte [ebp + 2]
shl eax, 8
or eax, edx
movzx edx, byte [ebp]
shl eax, 8
or eax, edx
xor edx, edx
mov dh, cl
movzx ecx, byte [esp + 0x1a]
mov dword [esp + 0x14], eax
or edx, ecx
movzx ecx, byte [esp + 0x19]
shl edx, 8
or edx, ecx
movzx ecx, byte [esp + 0x18]
shl edx, 8
or ecx, edx
mov dword [esp + 0x1c], ecx
mov dl, byte [esp + 0x1f]
test dl, dl
je 0x583b58
cmp dl, 0xff
jne 0x583a87
mov eax, ecx
jmp 0x583b58
movzx ebx, byte [esp + 0x17]
movzx esi, byte [esp + 0x1f]
mov ecx, ebx
imul ecx, esi
mov eax, 0x80808081
imul ecx
add edx, ecx
sar edx, 7
mov eax, edx
shr eax, 0x1f
add edx, eax
mov al, byte [esp + 0x17]
sub al, dl
add al, byte [esp + 0x1f]
mov dword [esp + 0x20], esi
mov byte [esp + 0x13], al
je 0x583b4c
movzx edx, byte [esp + 0x14]
movzx eax, al
shl eax, 8
mov dword [esp + 0x48], eax
movzx eax, byte [esp + 0x1c]
imul eax, esi
mov esi, edx
imul edx, ecx
imul esi, ebx
add eax, esi
mov esi, dword [esp + 0x48]
shl eax, 8
sub eax, edx
cdq
idiv esi
movzx edx, byte [esp + 0x15]
mov dword [esp + 0x48], edx
imul edx, ebx
mov byte [esp + 0x14], al
movzx eax, byte [esp + 0x1d]
imul eax, dword [esp + 0x20]
add eax, edx
mov edx, dword [esp + 0x48]
imul edx, ecx
shl eax, 8
sub eax, edx
cdq
idiv esi
movzx edx, byte [esp + 0x16]
mov dword [esp + 0x48], edx
imul edx, ebx
mov byte [esp + 0x15], al
movzx eax, byte [esp + 0x1e]
imul eax, dword [esp + 0x20]
add eax, edx
mov edx, dword [esp + 0x48]
imul edx, ecx
shl eax, 8
sub eax, edx
cdq
idiv esi
mov byte [esp + 0x16], al
mov al, byte [esp + 0x13]
mov esi, dword [esp + 0x3c]
mov byte [esp + 0x17], al
mov eax, dword [esp + 0x14]
mov dword [ebp], eax
add ebp, 4
sub dword [esp + 0x60], 1
fld st(1)
faddp st(4)
fxch st(3)
fstp dword [esp + 0x1c]
fld1
fxch st(2)
fxch st(4)
fxch st(1)
fxch st(3)
fxch st(1)
jne 0x583773
mov eax, 1
fadd st(4)
add dword [esp + 0x4c], eax
sub dword [esp + 0x58], eax
fstp dword [esp + 0x24]
jne 0x583703
fstp st(0)
fstp st(1)
fstp st(1)
fstp st(0)
mov eax, dword [esp + 0x90]
mov ecx, dword [esp + 0xb0]
push eax
push ecx
call dword [sym.imp.GDI32.dll_RestoreDC]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x98
ret 0x1c