Function at 0x640a4c
Capabilities:
Hide graphical window

Disassembly:
push ebx
push esi
push edi
add esp, 0xffffffac
mov esi, eax
mov eax, edx
mov dword [esi + 0x23c], eax
push eax
call fcn.004087ac
mov edi, eax
lea eax, [esp + 0x18]
xor ecx, ecx
mov edx, 0x3c
call fcn.00402cd8
mov dword [esp + 0x18], 0x3c
mov al, byte [esi + 0x248]
cmp al, 1
jne 0x640aa8
lea eax, [esp + 0x18]
push eax
mov eax, dword [esi + 0x244]
mov eax, dword [eax + 0x40]
mov ecx, 0xfffffffb
mov edx, dword [esi + 0x23c]
call fcn.00658680
mov ebx, eax
jmp 0x640adf
test al, al
jne 0x640ace
lea eax, [esp + 0x18]
push eax
mov eax, dword [esi + 0x244]
mov eax, dword [eax + 0x40]
mov ecx, 0xfffffffa
mov edx, dword [esi + 0x23c]
call fcn.00658680
mov ebx, eax
jmp 0x640adf
cmp al, 2
jne 0x640adf
lea edx, [esp + 0x18]
mov eax, esi
call fcn.00640efc
mov ebx, eax
mov byte [esi + 0x25c], bl
test bl, bl
je 0x640d01
push 0xfffffffffffffff0
mov eax, dword [esi + 0x23c]
push eax
call fcn.0040881c
test eax, 0x10000000
jne 0x640b1d
mov byte [esi + 0x25c], 0
push 0
mov eax, esi
call fcn.0043f298
push eax
call fcn.00408b04
jmp 0x640d01
test dword [esp + 0x3c], 0x8000
jbe 0x640b5c
cmp dword [esi + 0x22c], 1
jne 0x640b41
push 0
mov eax, esi
call fcn.0043f298
push eax
call fcn.00408b04
jmp 0x640b50
push 0
mov eax, esi
call fcn.0043f298
push eax
call fcn.00408b04
mov byte [esi + 0x25c], 0
jmp 0x640d01
push esi
push edi
lea esi, [esp + 0x24]
lea edi, [esp + 0x10]
mov ecx, 4
rep movsd dword es:[edi], dword [esi]
pop edi
pop esi
mov eax, dword [esp + 8]
mov dword [esp], eax
mov eax, dword [esp + 0xc]
mov dword [esp + 4], eax
push esp
mov eax, dword [esi + 0x23c]
push eax
call fcn.004089dc
mov eax, dword [esp]
mov dword [esi + 0x24c], eax
mov eax, dword [esp + 4]
mov dword [esi + 0x250], eax
mov eax, dword [esp + 0x10]
mov dword [esp], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 4], eax
push esp
mov eax, dword [esi + 0x23c]
push eax
call fcn.004089dc
mov eax, dword [esp]
mov dword [esi + 0x254], eax
mov eax, dword [esp + 4]
mov dword [esi + 0x258], eax
mov eax, dword [esp + 0xc]
neg eax
push eax
mov eax, dword [esp + 0xc]
neg eax
push eax
lea eax, [esp + 0x10]
push eax
call fcn.00408964
cmp dword [esi + 0x22c], 1
jne 0x640bfa
mov eax, dword [esp + 0x14]
mov dword [esi + 0x208], eax
jmp 0x640c04
mov eax, dword [esp + 0x10]
mov dword [esi + 0x208], eax
mov ecx, esp
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
call fcn.00412f64
mov eax, dword [esp]
mov dword [esi + 0x214], eax
mov eax, dword [esp + 4]
mov dword [esi + 0x218], eax
push esp
push edi
call fcn.004089dc
push 3
mov eax, dword [esi + 0x23c]
push eax
call fcn.004087a4
mov ebx, eax
test ebx, ebx
jne 0x640c43
xor ebx, ebx
push 5
mov eax, esi
call fcn.0043f298
push eax
call fcn.00408b04
mov byte [esi + 0x25c], 1
cmp byte [esi + 0x248], 2
je 0x640cab
push 0
mov eax, dword [esp + 0x18]
push eax
mov eax, dword [esp + 0x18]
push eax
mov eax, dword [esp + 0x10]
push eax
mov eax, dword [esp + 0x10]
push eax
push ebx
mov eax, esi
call fcn.0043f298
push eax
call fcn.00408abc
push 0xffffffffffffffff
mov eax, dword [esp + 0x18]
push eax
mov eax, dword [esp + 0x18]
push eax
mov eax, dword [esp + 0x10]
push eax
mov eax, dword [esp + 0x10]
push eax
mov eax, esi
call fcn.0043f298
push eax
call fcn.00408944
jmp 0x640d01
mov ecx, esp
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
call fcn.00412f64
push 0
mov eax, dword [esp + 0x18]
push eax
mov eax, dword [esp + 0x18]
push eax
mov eax, dword [esp + 0x10]
push eax
mov eax, dword [esp + 0x10]
push eax
push ebx
mov eax, esi
call fcn.0043f298
push eax
call fcn.00408abc
push 0xffffffffffffffff
mov eax, dword [esp + 0x18]
push eax
mov eax, dword [esp + 0x18]
push eax
mov eax, dword [esp + 0x10]
push eax
mov eax, dword [esp + 0x10]
push eax
mov eax, esi
call fcn.0043f298
push eax
call fcn.00408944
add esp, 0x54
pop edi
pop esi
pop ebx
ret