Function at 0x1001dbc
Capabilities:
Receive data
Receive data on socket
Terminate process

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x658
mov eax, dword [0x1004078]
push ebx
xor ebx, ebx
push esi
xor esi, esi
inc ebx
cmp dword [ebp + 8], ebx
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x628], esi
jle 0x1001dfc
push 0x272d
call fcn.010012a9
pop ecx
call fcn.0100138b
push ebx
call dword [sym.imp.msvcrt.dll_exit]
mov edi, dword [eax]
push edi
mov dword [ebp - 0x624], edi
call fcn.01001366
cmp dword [0x10040bc], esi
je 0x1001e21
push edi
push 0x2718
push ebx
call fcn.01002de4
add esp, 0xc
cmp dword [0x10040b4], esi
je 0x1001e2f
push edi
call fcn.01001bae
push 0
push ebx
push 0x1001145
push dword [0x1004370]
call fcn.01002d95
push 0x5c
push edi
call dword [sym.imp.msvcrt.dll_strrchr]
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x1001e60
cmp byte [esi + 1], 0
jne 0x1001e5e
mov byte [esi], 0
jmp 0x1001e60
xor esi, esi
lea eax, [ebp - 0x658]
push eax
push edi
call dword [sym.imp.msvcrt.dll__stat]
test eax, eax
pop ecx
pop ecx
jne 0x1001e8a
mov eax, dword [ebp - 0x652]
and ax, 0xf000
cmp ax, 0x4000
jne 0x1001e8a
mov dword [ebp - 0x628], ebx
test esi, esi
je 0x1001e91
mov byte [esi], 0x5c
push 0
push ebx
lea eax, [ebp - 0x404]
push eax
push dword [0x1004370]
mov dword [ebp - 0x60c], ebx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x10023a3
mov esi, 0x200
jmp 0x1001ebf
xor ebx, ebx
inc ebx
cmp byte [ebp - 0x404], 0xa
lea edi, [ebp - 0x403]
je 0x10023b2
push 0
push ebx
push edi
push dword [0x1004370]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, ebx
jne 0x10023bc
cmp byte [edi], 0xa
je 0x1001efc
inc edi
lea eax, [ebp - 0x204]
cmp edi, eax
jb 0x1001ed2
jmp 0x1001eff
mov byte [edi], 0
lea eax, [ebp - 0x204]
cmp edi, eax
je 0x100240b
cmp dword [0x10040bc], 0
je 0x1001f2b
lea eax, [ebp - 0x404]
push eax
push 0x2719
push ebx
call fcn.01002de4
add esp, 0xc
mov al, byte [ebp - 0x404]
cmp al, 1
je 0x100233c
cmp al, 2
je 0x100233c
cmp al, 0x45
je 0x10023c6
cmp al, 0x43
je 0x1001f55
cmp al, 0x44
jne 0x10023db
xor ecx, ecx
lea edi, [ebp - 0x403]
jmp 0x1001f65
mov ecx, dword [ebp - 0x618]
mov al, byte [edi]
cmp al, 0x30
jl 0x1002415
cmp al, 0x37
jg 0x1002415
movsx eax, al
sub eax, 0x30
shl ecx, 3
or eax, ecx
mov dword [ebp - 0x618], eax
inc edi
lea eax, [ebp - 0x3ff]
cmp edi, eax
jb 0x1001f5f
mov al, byte [edi]
inc edi
cmp al, 0x20
jne 0x100241c
xor ecx, ecx
jmp 0x1001fb1
cmp al, 0x39
jg 0x1001fbd
movsx eax, al
lea ecx, [ecx + ecx*4]
lea ecx, [eax + ecx*2 - 0x30]
inc edi
mov al, byte [edi]
cmp al, 0x30
mov dword [ebp - 0x608], ecx
jge 0x1001fa2
mov al, byte [edi]
inc edi
cmp al, 0x20
mov dword [ebp - 0x62c], edi
jne 0x1002423
push edi
call fcn.01001366
cmp dword [ebp - 0x628], 0
je 0x1002056
mov ebx, dword [ebp - 0x624]
cmp byte [ebx], 0
je 0x1002037
push 0x5c
push ebx
call dword [sym.imp.msvcrt.dll_strrchr]
test eax, eax
pop ecx
pop ecx
je 0x1002019
cmp byte [eax + 1], 0
jne 0x1002019
push edi
push ebx
push 0x100117c
lea eax, [ebp - 0x204]
push esi
push eax
call dword [sym.imp.msvcrt.dll__snprintf]
add esp, 0x14
mov byte [ebp - 5], 0
push edi
push ebx
push 0x1001198
lea eax, [ebp - 0x204]
push esi
push eax
call dword [sym.imp.msvcrt.dll__snprintf]
add esp, 0x14
mov byte [ebp - 5], 0
jmp 0x100206e
push edi
push 0x1001145
push ebx
push 0x1001190
lea eax, [ebp - 0x204]
push esi
push eax
call dword [sym.imp.msvcrt.dll__snprintf]
add esp, 0x18
jmp 0x1002031
mov eax, dword [ebp - 0x624]
lea edx, [ebp - 0x204]
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x1002064
lea eax, [ebp - 0x658]
push eax
lea eax, [ebp - 0x204]
push eax
call dword [sym.imp.msvcrt.dll__stat]
mov ebx, eax
neg ebx
sbb ebx, ebx
inc ebx
cmp dword [0x10040bc], 0
pop ecx
pop ecx
mov dword [ebp - 0x634], ebx
je 0x10020b4
test ebx, ebx
je 0x10020b4
lea eax, [ebp - 0x204]
push eax
push 0x271a
push 1
call fcn.01002de4
add esp, 0xc
cmp byte [ebp - 0x404], 0x44
jne 0x100212d
lea eax, [ebp - 0x658]
push eax
lea eax, [ebp - 0x204]
push eax
call dword [sym.imp.msvcrt.dll__stat]
test eax, eax
pop ecx
pop ecx
jne 0x10020f8
mov eax, dword [ebp - 0x652]
and ax, 0xf000
cmp ax, 0x4000
je 0x100210e
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], 0x14
jmp 0x100218a
push dword [ebp - 0x618]
lea eax, [ebp - 0x204]
push eax
call fcn.01001422
test eax, eax
jl 0x100218a
lea eax, [ebp - 0x204]
mov dword [ebp - 0x630], eax
lea eax, [ebp - 0x630]
push eax
push 1
call fcn.01001dbc
jmp 0x100237d
test ebx, ebx
je 0x1002152
test byte [ebp - 0x652], 0x80
jne 0x1002152
lea eax, [ebp - 0x204]
push eax
push 0x272e
call fcn.010012a9
pop ecx
pop ecx
jmp 0x100231f
mov eax, dword [0x10040b0]
neg eax
sbb eax, eax
and eax, 0xffffc000
add eax, 0x8000
or eax, 0x301
push 0x80
push eax
lea eax, [ebp - 0x204]
push eax
call dword [sym.imp.msvcrt.dll__open]
add esp, 0xc
test eax, eax
mov dword [ebp - 0x60c], eax
jge 0x10021a7
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov ecx, dword [sym.imp.msvcrt.dll__sys_errlist]
push dword [ecx + eax*4]
lea eax, [ebp - 0x204]
push eax
jmp 0x1002304
cmp dword [0x10040bc], 0
je 0x10021c6
lea eax, [ebp - 0x204]
push eax
push 0x271b
push 1
call fcn.01002de4
add esp, 0xc
push 0
push 1
push 0x1001145
push dword [0x1004370]
call fcn.01002d95
xor eax, eax
cmp dword [ebp - 0x608], eax
mov dword [ebp - 0x620], eax
mov dword [ebp - 0x61c], eax
jle 0x10022b6
mov eax, dword [ebp - 0x608]
mov dword [ebp - 0x610], esi
mov dword [ebp - 0x614], eax
mov eax, dword [ebp - 0x608]
cmp dword [ebp - 0x610], eax
mov ebx, esi
lea edi, [ebp - 0x604]
jle 0x1002222
mov ebx, dword [ebp - 0x614]
push 0
push ebx
push edi
push dword [0x1004370]
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x1002435
sub ebx, eax
add edi, eax
test ebx, ebx
jg 0x1002222
mov eax, dword [ebp - 0x608]
cmp dword [ebp - 0x610], eax
mov edi, esi
jle 0x1002258
mov edi, dword [ebp - 0x614]
cmp dword [ebp - 0x620], 0
jne 0x1002286
push edi
lea eax, [ebp - 0x604]
push eax
push dword [ebp - 0x60c]
call dword [sym.imp.msvcrt.dll__write]
add esp, 0xc
cmp eax, edi
je 0x1002286
mov dword [ebp - 0x620], 1
add dword [ebp - 0x61c], esi
mov eax, dword [ebp - 0x61c]
add dword [ebp - 0x610], esi
sub dword [ebp - 0x614], esi
cmp eax, dword [ebp - 0x608]
jl 0x1002206
mov ebx, dword [ebp - 0x634]
mov edi, dword [ebp - 0x62c]
push dword [ebp - 0x60c]
call dword [sym.imp.msvcrt.dll__close]
test ebx, ebx
pop ecx
jne 0x10022e4
test byte [ebp - 0x618], 0x80
jne 0x10022e4
lea eax, [ebp - 0x204]
push 0x100
push eax
call dword [sym.imp.msvcrt.dll__chmod]
pop ecx
pop ecx
call fcn.010014a6
cmp dword [ebp - 0x620], 0
je 0x1002326
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov ecx, dword [sym.imp.msvcrt.dll__sys_errlist]
push dword [ecx + eax*4]
push edi
push 0x1001158
push esi
push 0x1004380
call dword [sym.imp.msvcrt.dll__snprintf]
add esp, 0x14
mov byte [0x100457f], 0
call fcn.0100138b
jmp 0x100237d
push 0
push 1
push 0x1001145
push dword [0x1004370]
call fcn.01002d95
jmp 0x100237d
cmp dword [0x10040a8], 0
jne 0x100236a
lea eax, [ebp - 0x403]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100234e
sub eax, edx
push eax
lea eax, [ebp - 0x403]
push eax
push 2
call dword [sym.imp.msvcrt.dll__write]
add esp, 0xc
cmp byte [ebp - 0x404], 2
je 0x1001df5
inc dword [0x10040a0]
and dword [ebp - 0x60c], 0
push 0
push 1
lea eax, [ebp - 0x404]
push eax
push dword [0x1004370]
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jg 0x1001ebc
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.01002a47
leave
ret 8
push 0x2735
jmp 0x1001dea
push 0x2736
jmp 0x1001dea
push 0
push ebx
push 0x1001145
push dword [0x1004370]
call fcn.01002d95
jmp 0x10023a3
cmp dword [ebp - 0x60c], 0
je 0x100240b
lea eax, [ebp - 0x404]
push eax
push 0x100118c
push esi
push 0x1004380
call dword [sym.imp.msvcrt.dll__snprintf]
add esp, 0x10
mov byte [0x100457f], 0
jmp 0x1001df0
push 0x2737
jmp 0x1001dea
push 0x2738
jmp 0x1002428
push 0x2739
jmp 0x1002428
push 0x273a
call fcn.010012a9
xor ebx, ebx
inc ebx
jmp 0x1001def
push 1
jmp 0x1001df6