Function at 0x10004a20
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x5c
push ebx
mov ebx, ecx
push esi
push edi
mov eax, dword [ebx + 0x1c]
test eax, eax
je 0x10004b02
cmp dword [eax + 0xc], 2
jne 0x10004b02
mov eax, dword [ebp + 0x18]
mov esi, dword [ebp + 0x1c]
test eax, eax
je 0x10004b14
test esi, esi
jne 0x10004b08
cmp dword [ebp + 8], 4
jne 0x10004b08
mov ecx, 6
mov esi, eax
lea edi, [esp + 0x38]
rep movsd dword es:[edi], dword [esi]
fild dword [esp + 0x38]
mov esi, eax
mov eax, dword [ebp + 0x10]
mov ecx, 6
lea edi, [esp + 0x50]
test eax, eax
rep movsd dword es:[edi], dword [esi]
jne 0x10004a91
xor esi, esi
call fcn.10018874
jmp 0x10004acd
mov edi, dword [ebp + 0x14]
mov eax, edi
imul eax, edi
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x10]
mov ecx, eax
imul ecx, eax
fild dword [esp + 0x10]
mov dword [esp + 0x10], ecx
fild dword [esp + 0x10]
fdivp st(1)
fadd qword [0x10021270]
fsqrt
fdivr st(1)
call fcn.10018874
mov esi, eax
imul eax, edi
fstp st(0)
cdq
idiv dword [ebp + 0x10]
push 0
mov edi, eax
call dword [sym.imp.USER32.dll_GetSystemMetrics]
cdq
sub eax, edx
push 1
sar eax, 1
add esi, eax
mov dword [esp + 0x3c], esi
call dword [sym.imp.USER32.dll_GetSystemMetrics]
cdq
sub eax, edx
lea edx, [esp + 0x38]
sar eax, 1
add edi, eax
mov dword [ebp + 0x18], edx
mov dword [esp + 0x50], edi
lea esi, [esp + 0x50]
jmp 0x10004b05
mov esi, dword [ebp + 0x1c]
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x10004b14
mov ecx, dword [eax]
mov dword [esp + 0x20], ecx
jmp 0x10004b1c
mov dword [esp + 0x20], 0
test esi, esi
je 0x10004b28
mov edx, dword [esi]
mov dword [esp + 0x24], edx
jmp 0x10004b30
mov dword [esp + 0x24], 0
test eax, eax
jne 0x10004b57
test esi, esi
jne 0x10004b57
push 0x647
push str.ImmCondition.cpp
push 4
call sym.IFC22.dll_public:_static_void___cdecl_CIFCErrors::SetErrorCode_long_int__char_const___int_
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov ecx, ebx
call sym.IFC22.dll_protected:_void___thiscall_CImmEffect::reset_effect_struct_void_
mov eax, dword [ebp + 0xc]
mov edx, 2
or eax, edx
xor edi, edi
mov dword [ebx + 0x34], eax
or eax, 0xffffffff
mov dword [ebx + 0x44], eax
mov dword [ebx + 0x38], eax
mov eax, dword [ebp + 8]
xor ecx, ecx
cmp eax, 0x80000000
mov dword [ebx + 0x3c], edi
mov dword [ebx + 0x40], 0x2710
mov dword [ebx + 0x48], edi
mov dword [ebx + 0x58], edi
je 0x10004b98
mov dword [ebx + 0xf8], eax
mov eax, dword [ebx + 0xf8]
dec eax
cmp eax, 3
ja case.default.0x10004ba8
jmp dword [eax*4 + 0x10005050]
mov dword [ebx + 0x4c], 1
mov dword [ebx + 0x68], edi
jmp 0x10004bfc
mov dword [ebx + 0x4c], 1
mov dword [ebx + 0x68], 4
mov dword [ebx + 0x5c], 0x18
mov eax, esi
jmp 0x10004c06
mov eax, dword [ebp + 0x18]
mov dword [ebx + 0x4c], edx
mov dword [ebx + 0x68], edi
mov dword [ebx + 0x6c], 4
mov dword [ebx + 0x5c], 0x30
mov ecx, esi
jmp 0x10004c06
mov dword [ebx + 0x4c], edx
mov dword [ebx + 0x68], edi
mov dword [ebx + 0x6c], 4
mov eax, dword [ebp + 0x18]
mov dword [ebx + 0x5c], 0x18
mov esi, dword [eax + 4]
cmp esi, 0x80000000
je 0x10004c17
mov dword [ebx + 0xcc], esi
cmp ecx, edi
je 0x10004c2c
mov esi, dword [ecx + 4]
cmp esi, 0x80000000
je 0x10004c2c
mov dword [ebx + 0xe4], esi
mov esi, dword [eax + 8]
cmp esi, 0x80000000
je 0x10004c3d
mov dword [ebx + 0xd0], esi
cmp ecx, edi
je 0x10004c52
mov esi, dword [ecx + 8]
cmp esi, 0x80000000
je 0x10004c52
mov dword [ebx + 0xe8], esi
mov esi, dword [eax + 0xc]
cmp esi, 0x80000000
je 0x10004c63
mov dword [ebx + 0xd4], esi
cmp ecx, edi
je 0x10004c78
mov esi, dword [ecx + 0xc]
cmp esi, 0x80000000
je 0x10004c78
mov dword [ebx + 0xec], esi
mov esi, dword [eax + 0x10]
cmp esi, 0x80000000
je 0x10004c89
mov dword [ebx + 0xd8], esi
cmp ecx, edi
je 0x10004c9e
mov esi, dword [ecx + 0x10]
cmp esi, 0x80000000
je 0x10004c9e
mov dword [ebx + 0xf0], esi
mov esi, dword [eax + 0x14]
cmp esi, 0x80000000
je 0x10004caf
mov dword [ebx + 0xdc], esi
cmp ecx, edi
je 0x10004cc4
mov esi, dword [ecx + 0x14]
cmp esi, 0x80000000
je 0x10004cc4
mov dword [ebx + 0xf4], esi
mov eax, dword [eax]
cmp eax, 0x80000000
je 0x10004cdb
cmp eax, dword [0x10021220]
je 0x10004cdb
mov dword [ebx + 0xc8], eax
cmp ecx, edi
je 0x10004cf7
mov ecx, dword [ecx]
cmp ecx, 0x80000000
je 0x10004cf7
cmp ecx, dword [0x10021224]
je 0x10004cf7
mov dword [ebx + 0xe0], ecx
cmp dword [ebx + 0xf8], 4
jne 0x10004d2c
mov eax, dword [ebp + 0x10]
cmp eax, 0x80000000
jne 0x10004d0f
mov ecx, dword [ebx + 0x54]
mov eax, dword [ecx]
mov dword [ebx + 0x70], eax
mov eax, dword [ebp + 0x14]
cmp eax, 0x80000000
jne 0x10004d34
cmp dword [ebx + 0x4c], edx
jne 0x10004d37
mov ecx, dword [ebx + 0x54]
mov edx, dword [ecx + 4]
mov dword [ebx + 0x74], edx
jmp 0x10004d37
mov eax, 1
mov dword [ebx + 0x70], eax
mov dword [ebx + 0x74], eax
lea eax, [ebx + 0xc8]
lea esi, [ebx + 0x8c]
mov dword [esp + 0x10], eax
mov dword [ebx + 0x60], eax
mov ecx, 4
mov edi, 0x100216c8
xor eax, eax
repe cmpsd dword [esi], dword es:[edi]
jne 0x10004d92
mov eax, dword [ebx + 0x100]
test eax, eax
jne 0x10004d92
cmp dword [ebx + 0xf8], 4
jne 0x10004d92
mov ecx, 2
mov edi, 0x10021220
lea esi, [esp + 0x20]
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
je 0x10004d92
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
push eax
push ecx
mov ecx, ebx
call sym.IFC22.dll_protected:_void___thiscall_CImmCondition::convert_line_point_to_offset_struct_tagPOINT_
cmp dword [ebx + 0xa0], 3
jne 0x10005023
mov ecx, 4
mov edi, 0x100216c8
lea esi, [ebx + 0x8c]
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
jne 0x10005023
mov esi, dword [sym.imp.USER32.dll_GetSystemMetrics]
push edx
call esi
mov dword [esp + 0x14], eax
push 1
fild dword [esp + 0x18]
fstp qword [esp + 0x2c]
call esi
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 0x4c]
fild dword [esp + 0x14]
cmp eax, 1
fstp qword [esp + 0x30]
jne 0x10004e2c
mov eax, dword [ebx + 0x50]
cmp dword [eax], 0
jne 0x10004df4
fld qword [esp + 0x28]
jmp 0x10004df8
fld qword [esp + 0x30]
call fcn.10018874
mov ecx, dword [esp + 0x10]
mov esi, eax
mov eax, dword [ecx]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 5
cdq
idiv esi
sub eax, 0x2710
mov dword [ecx], eax
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
cmp dword [ebx + 0x5c], 0x30
jne 0x10004eb7
mov esi, dword [ebx + 0x50]
cmp dword [esi], 0
jne 0x10004e44
fld qword [esp + 0x28]
jmp 0x10004e48
fld qword [esp + 0x30]
call fcn.10018874
mov ecx, dword [esp + 0x10]
mov edi, eax
mov eax, dword [ecx]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 5
cdq
idiv edi
sub eax, 0x2710
mov dword [ecx], eax
mov eax, dword [esi + 4]
test eax, eax
jne 0x10004e7b
fld qword [esp + 0x28]
jmp 0x10004e7f
fld qword [esp + 0x30]
call fcn.10018874
mov ecx, eax
mov eax, dword [ebx + 0xe0]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 5
cdq
idiv ecx
sub eax, 0x2710
mov dword [ebx + 0xe0], eax
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
test byte [ebx + 0x34], 0x20
je 0x10004f2b
fild dword [ebx + 0x70]
fmul qword [0x10021230]
fmul qword [0x10021278]
fld st(0)
fsin
fstp qword [esp + 0x18]
fcos
fld qword [esp + 0x18]
fld st(1)
fmul qword [esp + 0x30]
fdiv qword [esp + 0x28]
fpatan
fmul qword [0x10021288]
fdiv qword [0x10021230]
call fcn.10018874
fld qword [esp + 0x18]
fcomp qword [0x10021268]
mov dword [ebx + 0x70], eax
fnstsw ax
test ah, 1
je 0x10004f15
fld qword [esp + 0x18]
fchs
fstp qword [esp + 0x18]
fcom qword [0x10021268]
fnstsw ax
test ah, 1
je 0x10004fd1
jmp 0x10004fcf
fild dword [ebx + 0x74]
fmul qword [esp + 0x30]
fdiv qword [esp + 0x28]
call fcn.10018874
mov dword [esp + 0x18], eax
mov dword [ebx + 0x74], eax
mov ebx, dword [ebx + 0x70]
cdq
mov ecx, eax
mov eax, ebx
xor ecx, edx
mov dword [esp + 0x20], ebx
sub ecx, edx
cdq
xor eax, edx
sub eax, edx
add ecx, eax
mov dword [esp + 0x14], ecx
fild dword [esp + 0x14]
fcom dword [0x10021280]
fnstsw ax
test ah, 0x40
je 0x10004f93
push str.x_and_y_direction_vectors_are_both_zero__n
fstp st(0)
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
fld qword [0x10021268]
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0x3ff00000
jmp 0x10004fd1
fild dword [esp + 0x18]
fld st(1)
fdivp st(1)
fstp qword [esp + 0x18]
fild dword [esp + 0x20]
fxch st(1)
fdivp st(1)
fld qword [esp + 0x18]
fcomp qword [0x10021268]
fnstsw ax
test ah, 1
je 0x10004fc2
fld qword [esp + 0x18]
fchs
fstp qword [esp + 0x18]
fcom qword [0x10021268]
fnstsw ax
test ah, 1
je 0x10004fd1
fchs
mov edi, dword [esp + 0x10]
mov eax, dword [edi]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea esi, [eax + eax*4]
shl esi, 5
mov dword [esp + 0x20], esi
fild dword [esp + 0x20]
fld st(0)
fmul qword [esp + 0x18]
fdiv qword [esp + 0x28]
fstp qword [esp + 0x28]
fmulp st(1)
fdiv qword [esp + 0x30]
fld st(0)
fmul st(1)
fld qword [esp + 0x28]
fmul qword [esp + 0x28]
faddp st(1)
fsqrt
call fcn.10018874
test esi, esi
fstp st(0)
mov dword [edi], eax
jge 0x10005023
neg eax
mov dword [edi], eax
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
push 0x684
push str.ImmCondition.cpp
push 3
call sym.IFC22.dll_public:_static_void___cdecl_CIFCErrors::SetErrorCode_long_int__char_const___int_
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18