Function at 0x407213
Capabilities:
Set current directory

Disassembly:
sub esp, 0x28
push ebx
push ebp
push esi
mov esi, ecx
mov ebx, edx
xor ecx, ecx
mov dword [esp + 0x10], ebx
push edi
mov dword [esp + 0x28], ecx
mov edi, dword [esi + 0x10]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], ecx
push ecx
test edi, edi
jne 0x40746b
mov ebx, dword [esp + 0x40]
mov edi, 0x76d080
push edi
push 0x10000
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
mov ebp, eax
lea ecx, [esp + 0x24]
mov edx, edi
mov dword [esp + 0x30], ebp
call fcn.00470ccc
mov dword [esp + 0x2c], eax
test eax, eax
jne 0x407282
push edi
push str.ERROR_loading__s_n
call fcn.004010b4
pop ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
lea eax, [esp + 0x20]
push eax
mov eax, dword [esp + 0x18]
lea edx, [ebp + 1]
push 0
lea ecx, [eax*4 + 4]
call fcn.0046c097
mov edi, dword [esp + 0x28]
mov ebp, eax
pop ecx
pop ecx
test edi, edi
jne 0x4072ae
xor eax, eax
xor ecx, ecx
jmp 0x4072b3
mov eax, dword [edi - 4]
mov ecx, eax
push eax
push 0x76d080
push ecx
push edi
call fcn.005aca80
mov edx, dword [esp + 0x40]
add esp, 0xc
mov dword [ebp], edi
mov edi, 0x76d080
mov ecx, edi
push 0x6b4808
call fcn.00470a43
pop ecx
pop ecx
cmp eax, 0x10000
jae 0x407664
push edi
mov byte [eax + 0x76d080], 0
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push 2
pop edi
cmp dword [esp + 0x14], edi
jle 0x407465
lea eax, [ebp + 4]
mov dword [esp + 0x20], eax
cmp dword [esi + 0x24], 0
jne 0x407354
push 0xb
push str.__script_db
push dword [ebx + edi*4]
call fcn.005c9c50
add esp, 0xc
test eax, eax
jne 0x407354
lea ecx, [edi + 1]
mov dword [esp + 0x30], ecx
cmp ecx, dword [esp + 0x14]
jge 0x407354
mov edx, dword [ebx + edi*4 + 4]
mov ecx, dword [esi + 0x1c]
push eax
call fcn.00402962
mov ecx, eax
call fcn.00473ca4
mov edi, dword [esp + 0x34]
pop ecx
mov dword [esi + 0x24], eax
jmp 0x40745a
push 0xe
push str.__script_flags
push dword [ebx + edi*4]
call fcn.005c9c50
add esp, 0xc
test eax, eax
jne 0x4073d5
lea eax, [edi + 1]
mov dword [esp + 0x30], eax
cmp eax, dword [esp + 0x14]
jge 0x4073d5
mov eax, dword [ebx + edi*4 + 4]
movzx eax, word [eax]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov ecx, 0x3078
cmp ax, cx
jne 0x40745a
mov eax, dword [ebx + edi*4 + 4]
test eax, eax
je 0x4073aa
push 0x20
push eax
call fcn.005d06e0
pop ecx
pop ecx
cmp eax, 0xa
jg 0x4073cc
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [ebx + edi*4 + 4]
lea edx, [eax - 2]
add ecx, 2
call fcn.0046a903
push dword [esp + 0x18]
call dword [sym.imp.WS2_32.dll_ntohl]
mov dword [esp + 0x18], eax
mov edi, dword [esp + 0x30]
jmp 0x40745a
push 0x10
push str.__script_timeout
push dword [ebx + edi*4]
call fcn.005c9c50
add esp, 0xc
test eax, eax
jne 0x40740c
lea eax, [edi + 1]
mov dword [esp + 0x30], eax
cmp eax, dword [esp + 0x14]
jge 0x40740c
push dword [ebx + edi*4 + 4]
call fcn.005cfd10
mov edi, dword [esp + 0x34]
pop ecx
mov dword [esp + 0x28], eax
jmp 0x40745a
push 0x10
push str.__script_connect
push dword [ebx + edi*4]
call fcn.005c9c50
add esp, 0xc
test eax, eax
jne 0x40744a
mov dword [esp + 0x1c], 1
cmp dword [esi + 0x24], eax
jne 0x40745a
mov ecx, dword [esi + 0x1c]
mov edx, 0x6b4850
push eax
call fcn.00402962
mov ecx, eax
call fcn.00473ca4
pop ecx
mov dword [esi + 0x24], eax
jmp 0x40745a
mov ecx, dword [esp + 0x20]
mov eax, dword [ebx + edi*4]
mov dword [ecx], eax
add ecx, 4
mov dword [esp + 0x20], ecx
inc edi
cmp edi, dword [esp + 0x14]
jl 0x40730a
mov edi, dword [esp + 0x24]
jmp 0x4074c1
mov eax, dword [esi + 0x14]
xor edx, edx
push ecx
lea ecx, [ebx*4 + 4]
mov dword [esp + 0x34], eax
call fcn.0046c097
mov ebp, eax
xor eax, eax
inc eax
pop ecx
cmp ebx, eax
mov ebx, dword [esp + 0x40]
pop ecx
jle 0x4074b6
mov edx, dword [esp + 0x14]
lea ecx, [ebp + 4]
sub ebx, ebp
dec edx
lea eax, [edx + 1]
mov dword [esp + 0x30], eax
mov eax, dword [ebx + ecx]
mov dword [ecx], eax
lea ecx, [ecx + 4]
sub edx, 1
jne 0x4074a1
mov ebx, dword [esp + 0x3c]
mov eax, dword [esp + 0x30]
and dword [ebp + eax*4], 0
mov eax, dword [esi + 0x1c]
mov dword [ebp], eax
mov edx, dword [esp + 0x1c]
mov dword [esi + 0x3c], 1
test edx, edx
je 0x4074d5
mov ecx, dword [esi + 0x24]
jmp 0x4074d7
xor ecx, ecx
push esi
xor eax, eax
mov dword [esp + 0x38], 0x405b8a
test edx, edx
cmove eax, dword [esp + 0x38]
push eax
push dword [esi + 0x18]
push dword [esi + 0x1c]
push ecx
push ebp
push dword [esi]
push dword [esp + 0x44]
call fcn.00461883
mov edx, dword [esp + 0x38]
mov ecx, eax
call fcn.0046195b
push esi
mov edx, 0x40705b
mov dword [esi + 8], eax
mov ecx, eax
call fcn.0044a319
mov ecx, dword [esi + 8]
add esp, 0x24
cmp dword [esp + 0x1c], 0
je 0x407531
push esi
call fcn.00402903
pop ecx
jmp 0x4075c5
call fcn.004119c6
mov ecx, dword [esi + 8]
mov edx, esi
call fcn.0041182a
mov ecx, dword [esi + 8]
push 0x6b4854
push 0xfffffffffffffffe
pop edx
call fcn.0040ece7
pop ecx
mov ecx, dword [esi + 8]
call fcn.0041259d
mov ecx, dword [esi + 8]
mov edx, str.meshDesktop
push 0x40706c
call fcn.0043c03f
pop ecx
mov ecx, dword [esi + 8]
mov edx, dword [ecx + 0x64]
call fcn.004123b9
mov ecx, dword [esi + 8]
mov edx, 0x4070ff
push 6
push 0x18075380
push 0
call fcn.00411e30
mov ecx, dword [esi + 8]
add esp, 0xc
mov edx, esi
call fcn.0041182a
mov ecx, dword [esi + 8]
push 0x6b4878
push 0xfffffffffffffffe
pop edx
call fcn.0040ece7
mov ecx, dword [esi + 8]
mov dword [esp], str.startMeshAgent
push 0xfffffffffffffffe
pop edx
call fcn.0040ece7
pop ecx
mov ecx, dword [esi + 8]
call fcn.0041259d
cmp dword [esi + 0x10], 0
jne 0x4075d0
mov eax, dword [ebp]
jmp 0x4075d5
mov eax, 0x6b4898
mov ecx, dword [esi + 8]
mov edx, edi
push 0
push eax
push dword [esp + 0x34]
call fcn.00461ded
add esp, 0xc
test eax, eax
jne 0x4075f9
mov ecx, dword [esi + 8]
call fcn.00461e76
test eax, eax
je 0x40760f
mov ecx, dword [esi + 8]
or edx, 0xffffffff
push 0
call fcn.004109e7
pop ecx
mov ecx, dword [esi + 8]
call fcn.0041259d
push 1
push edi
call fcn.005cdee0
push 1
push ebp
call fcn.005cdee0
add esp, 0x10
cmp dword [esp + 0x1c], 0
je 0x40727a
push 0x6b48d4
call fcn.004010b4
mov edx, dword [esp + 0x18]
pop ecx
push 0
push ebx
mov ecx, esi
call fcn.00405d4b
pop ecx
pop ecx
test eax, eax
jne 0x40727a
mov ecx, dword [esi]
pop edi
pop esi
pop ebp
mov dword [ecx], 2
pop ebx
add esp, 0x28
jmp fcn.0046c589
call fcn.0059b550
int3