Function at 0x40d361
Capabilities:
Create thread
Get file attributes
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8d8
push esi
and dword [ebp - 0x7c8], 0
push 0x104
push 0
lea eax, [ebp - 0x414]
push eax
call fcn.0041ecc0
add esp, 0xc
mov eax, dword [ebp + 0x10]
movsx eax, byte [eax]
cmp eax, 0x2f
je 0x40d3ac
push dword [ebp + 0x10]
push 0x442d8c
lea eax, [ebp - 0x8cc]
push eax
call fcn.0041ee40
add esp, 0xc
jmp 0x40d3c9
mov eax, dword [ebp + 0x10]
mov byte [eax], 0x5c
push dword [ebp + 0x10]
push 0x442d90
lea eax, [ebp - 0x8cc]
push eax
call fcn.0041ee40
add esp, 0xc
and dword [ebp - 0x108], 0
and dword [ebp - 0x10c], 0
jmp 0x40d3f3
mov eax, dword [ebp - 0x108]
inc eax
mov dword [ebp - 0x108], eax
mov eax, dword [ebp - 0x10c]
inc eax
mov dword [ebp - 0x10c], eax
lea eax, [ebp - 0x8cc]
push eax
call fcn.0041ec40
pop ecx
cmp dword [ebp - 0x108], eax
jae 0x40d4c7
mov esi, dword [ebp - 0x108]
inc esi
inc esi
lea eax, [ebp - 0x8cc]
push eax
call fcn.0041ec40
pop ecx
cmp esi, eax
jae 0x40d47c
mov eax, dword [ebp - 0x108]
movsx eax, byte [ebp + eax - 0x8cc]
cmp eax, 0x25
jne 0x40d47c
mov eax, dword [ebp - 0x108]
movsx eax, byte [ebp + eax - 0x8cb]
cmp eax, 0x32
jne 0x40d47c
mov eax, dword [ebp - 0x108]
movsx eax, byte [ebp + eax - 0x8ca]
cmp eax, 0x30
jne 0x40d47c
mov eax, dword [ebp - 0x10c]
mov byte [ebp + eax - 0x414], 0x20
mov eax, dword [ebp - 0x108]
inc eax
inc eax
mov dword [ebp - 0x108], eax
jmp 0x40d4c2
mov eax, dword [ebp - 0x108]
movsx eax, byte [ebp + eax - 0x8cc]
cmp eax, 0x2f
jne 0x40d49b
mov dword [ebp - 0x8d4], 0x5c
jmp 0x40d4af
mov eax, dword [ebp - 0x108]
movsx eax, byte [ebp + eax - 0x8cc]
mov dword [ebp - 0x8d4], eax
mov eax, dword [ebp - 0x10c]
mov cl, byte [ebp - 0x8d4]
mov byte [ebp + eax - 0x414], cl
jmp 0x40d3d9
lea eax, [ebp - 0x414]
push eax
push dword [ebp + 0xc]
push 0x442d94
lea eax, [ebp - 0x104]
push eax
call fcn.0041ee40
add esp, 0x10
push 0x442d9c
lea eax, [ebp - 0x104]
push eax
call fcn.00420380
pop ecx
pop ecx
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [ebp - 0x8d8], eax
cmp dword [ebp - 0x8d8], 0x10
je 0x40d51f
cmp dword [ebp - 0x8d8], 0xffffffff
je 0x40d52b
jmp 0x40d53b
mov dword [ebp - 0x7c8], 1
jmp 0x40d53b
push dword [ebp + 8]
call dword [0x4e35bc]
xor eax, eax
jmp 0x40d72a
mov eax, dword [ebp - 0x10c]
movsx eax, byte [ebp + eax - 0x415]
cmp eax, 0x5c
jne 0x40d558
mov dword [ebp - 0x7c8], 1
mov eax, dword [ebp + 8]
mov dword [ebp - 0x7c4], eax
and dword [ebp - 0x418], 0
cmp dword [ebp - 0x7c8], 0
je 0x40d5e6
cmp dword [ebp + 0x14], 0
je 0x40d5d4
push 0x442da0
lea eax, [ebp - 0x104]
push eax
call fcn.00420140
pop ecx
pop ecx
lea eax, [ebp - 0x104]
push eax
lea eax, [ebp - 0x740]
push eax
call fcn.0041ee40
pop ecx
pop ecx
lea eax, [ebp - 0x414]
push eax
call fcn.0040e024
pop ecx
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x63c]
push eax
call fcn.0041ee40
pop ecx
pop ecx
mov dword [ebp - 0x41c], 1
or dword [ebp - 0x430], 0xffffffff
jmp 0x40d5e4
push dword [ebp + 8]
call dword [0x4e35bc]
xor eax, eax
jmp 0x40d72a
jmp 0x40d64d
push 0
push 0
push 3
push 0
push 1
push 0x80000000
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x8d0], eax
cmp dword [ebp - 0x8d0], 0xffffffff
je 0x40d64d
lea eax, [ebp - 0x104]
push eax
lea eax, [ebp - 0x740]
push eax
call fcn.0041ee40
pop ecx
pop ecx
and dword [ebp - 0x41c], 0
push 0
push dword [ebp - 0x8d0]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x430], eax
push dword [ebp - 0x8d0]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp + 0x18]
push str._MAIN_
push str._s_Worker_thread_of_server_thread:__d
lea eax, [ebp - 0x30c]
push eax
call fcn.0041ee40
add esp, 0x10
push 0
push 3
lea eax, [ebp - 0x30c]
push eax
call fcn.0041d7c3
add esp, 0xc
mov dword [ebp - 0x42c], eax
mov eax, dword [ebp - 0x42c]
imul eax, eax, 0x244
mov ecx, dword [ebp + 0x18]
mov dword [eax + 0x44bb1c], ecx
lea eax, [ebp - 0x310]
push eax
push 0
lea eax, [ebp - 0x7c4]
push eax
push 0x40d173
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ecx, dword [ebp - 0x42c]
imul ecx, ecx, 0x244
mov dword [ecx + 0x44bb30], eax
mov eax, dword [ebp - 0x42c]
imul eax, eax, 0x244
cmp dword [eax + 0x44bb30], 0
je 0x40d6f2
cmp dword [ebp - 0x418], 0
jne 0x40d6f0
push 5
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40d6dd
jmp 0x40d728
push dword [ebp + 8]
call dword [0x4e35bc]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._MAIN_
push str._s_Failed_to_start_worker_thread__error___d
lea eax, [ebp - 0x30c]
push eax
call fcn.0041ee40
add esp, 0x10
lea eax, [ebp - 0x30c]
push eax
call fcn.0040a845
pop ecx
xor eax, eax
pop esi
leave
ret