Function at 0x40a827
Capabilities:
Encode data using base64
Get file size

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
sub esp, 0xe08
push ebx
mov ebx, dword [eax + 0xc]
push esi
push edi
mov edi, ebx
shr edi, 0x1c
and edi, 3
je 0x40af1e
cmp edi, 3
ja 0x40af1e
mov esi, dword [ebp + 8]
add esi, 0x14
push 0x1001
call fcn.00404f12
push 0x1001
push 0
push dword [esi]
call sub.msvcrt.dll_memset
mov ecx, dword [esi]
add esp, 0xc
mov eax, 0x1000
push eax
push ecx
lea ecx, [edi + edi - 2]
mov edx, 0x100
shl edx, cl
and ebx, 0xffffff
imul edx, ebx
add edx, eax
mov eax, dword [ebp + 8]
push edx
push dword [eax + edi*4]
call fcn.0040452d
add esp, 0x10
test eax, eax
je 0x40af1e
mov esi, dword [esi]
lea ebx, [esi + 0x24]
push str.http:
mov eax, ebx
call fcn.00403ac8
test eax, eax
pop ecx
jne 0x40af1e
push 0x3a
push ebx
call sub.msvcrt.dll__mbschr
test eax, eax
pop ecx
pop ecx
je 0x40af1e
and dword [ebp - 0x38], 0
inc eax
push 9
mov dword [ebp - 8], eax
xor eax, eax
pop ecx
lea edi, [ebp - 0x34]
rep stosd dword es:[edi], eax
mov edi, ebx
xor ebx, ebx
test edi, edi
je 0x40a909
push edi
call sub.msvcrt.dll_strlen
lea eax, [eax + edi + 1]
cmp byte [eax], 0
pop ecx
mov dword [ebp + ebx*4 - 0x38], eax
je 0x40a909
inc ebx
cmp ebx, 0xa
mov edi, eax
jl 0x40a8e9
push 0x7b0
lea eax, [ebp - 0xa00]
push 0
push eax
call sub.msvcrt.dll_memset
mov ecx, dword [esi + 0x18]
mov eax, 0x412415
add esp, 0xc
mov dword [ebp - 0xa00], eax
mov dword [ebp - 0x9fc], eax
call fcn.0040a20c
mov ecx, dword [esi + 8]
mov dword [ebp - 0x290], eax
call fcn.0040a20c
mov ecx, dword [esi + 0x10]
mov dword [ebp - 0x28c], eax
call fcn.0040a20c
test eax, eax
jne 0x40a966
and dword [ebp - 0x288], eax
and dword [ebp - 0x284], eax
jmp 0x40a972
push eax
lea ebx, [ebp - 0x288]
call fcn.0040a5b0
mov ecx, dword [esi + 0xc]
call fcn.0040a20c
test eax, eax
jne 0x40a98c
and dword [ebp - 0x280], eax
and dword [ebp - 0x27c], eax
jmp 0x40a998
push eax
lea ebx, [ebp - 0x280]
call fcn.0040a5b0
mov ecx, dword [esi + 0x14]
call fcn.0040a20c
test eax, eax
jne 0x40a9b2
and dword [ebp - 0x278], eax
and dword [ebp - 0x274], eax
jmp 0x40a9be
push eax
lea ebx, [ebp - 0x278]
call fcn.0040a5b0
xor ebx, ebx
mov edi, dword [ebp + ebx*8 - 0x38]
test edi, edi
je 0x40a9fe
mov esi, dword [ebp + ebx*8 - 0x34]
test esi, esi
je 0x40a9fe
push str.request_method
push edi
call sub.msvcrt.dll__strcmpi
test eax, eax
pop ecx
pop ecx
jne 0x40a9e7
mov dword [ebp - 0x9fc], esi
push str.response_head
push edi
call sub.msvcrt.dll__strcmpi
test eax, eax
pop ecx
pop ecx
jne 0x40a9fe
mov dword [ebp - 0xa00], esi
inc ebx
cmp ebx, 5
jl 0x40a9c0
mov esi, dword [ebp - 8]
push 0x2f
push esi
mov dword [ebp - 0xa04], esi
call sub.msvcrt.dll_strrchr
test eax, eax
pop ecx
pop ecx
je 0x40aa24
cmp byte [eax + 1], 0
jne 0x40aa24
mov byte [eax], 0
push 0x2f
push esi
call sub.msvcrt.dll_strrchr
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x40aa7c
inc esi
push 0x3f
push esi
call sub.msvcrt.dll_strchr
test eax, eax
pop ecx
pop ecx
je 0x40aa4b
inc eax
cmp byte [eax], 0
je 0x40aa4b
mov esi, eax
push 0x3d
push esi
call sub.msvcrt.dll_strchr
test eax, eax
pop ecx
pop ecx
je 0x40aa6c
lea edi, [eax + 1]
push 0x3d
push edi
call sub.msvcrt.dll_strchr
test eax, eax
pop ecx
pop ecx
jne 0x40aa6c
mov esi, edi
push esi
push 0x40
pop ebx
lea edi, [ebp - 0x4b7]
call fcn.00403c2b
pop ecx
xor esi, esi
push 0xff
lea eax, [ebp - 0x24b]
push esi
push eax
mov dword [ebp - 8], esi
mov byte [ebp - 0x24c], 0
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [ebp - 0xc], esi
jmp 0x40ac44
xor eax, eax
cmp dword [ebp - 0xc], eax
jne 0x40aad7
push str.http
lea eax, [ebp - 0x24c]
call fcn.00403ac8
test eax, eax
pop ecx
jne 0x40ac41
lea eax, [ebp - 0x24c]
push eax
lea edi, [ebp - 0x4f7]
jmp 0x40ac38
push 0xff
push eax
mov dword [ebp - 0x10], eax
mov byte [ebp - 0x14c], al
lea eax, [ebp - 0x14b]
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
push 0x412d30
lea eax, [ebp - 0x24c]
push eax
lea eax, [ebp - 0x14c]
push eax
lea ebx, [ebp - 0x10]
call fcn.00404764
mov esi, dword [ebp - 0x10]
add esp, 0xc
push str.content_type
lea eax, [ebp - 0x14c]
lea esi, [ebp + esi - 0x24b]
call fcn.00403ac8
test eax, eax
pop ecx
jne 0x40ab42
push esi
push 0x7f
pop ebx
lea edi, [ebp - 0x9f8]
call fcn.00403c2b
pop ecx
push str.server
lea eax, [ebp - 0x14c]
call fcn.00403ac8
test eax, eax
pop ecx
jl 0x40ab67
push esi
push 0x7f
pop ebx
lea edi, [ebp - 0x978]
call fcn.00403c2b
pop ecx
push str.location
lea eax, [ebp - 0x14c]
call fcn.00403ac8
test eax, eax
pop ecx
jl 0x40ab8e
push esi
mov ebx, 0x400
lea edi, [ebp - 0x8f8]
call fcn.00403c2b
pop ecx
push str.date
lea eax, [ebp - 0x14c]
call fcn.00403ac8
test eax, eax
pop ecx
jl 0x40abb0
push esi
lea eax, [ebp - 0x270]
push eax
call fcn.0040a609
push str.last_modified
lea eax, [ebp - 0x14c]
call fcn.00403ac8
test eax, eax
pop ecx
jl 0x40abd2
push esi
lea eax, [ebp - 0x268]
push eax
call fcn.0040a609
push str.content_encoding
lea eax, [ebp - 0x14c]
call fcn.00403ac8
test eax, eax
pop ecx
jl 0x40abf7
push esi
push 0x1f
pop ebx
lea edi, [ebp - 0x437]
call fcn.00403c2b
pop ecx
push str.cache_control
lea eax, [ebp - 0x14c]
call fcn.00403ac8
test eax, eax
pop ecx
jl 0x40ac1c
push esi
push 0x3f
pop ebx
lea edi, [ebp - 0x312]
call fcn.00403c2b
pop ecx
push str.etag
lea eax, [ebp - 0x14c]
call fcn.00403ac8
test eax, eax
pop ecx
jl 0x40ac41
push esi
lea edi, [ebp - 0x2d2]
push 0x3f
pop ebx
call fcn.00403c2b
pop ecx
inc dword [ebp - 0xc]
mov ebx, dword [ebp - 0xa00]
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x24c]
push eax
call fcn.004048b2
test eax, eax
pop ecx
pop ecx
jne 0x40aaa5
lea eax, [ebp - 0x4b7]
push 0x2e
push eax
call sub.msvcrt.dll_strchr
mov esi, 0x3ff
xor ebx, ebx
push esi
mov dword [ebp - 8], eax
lea eax, [ebp - 0xe03]
push ebx
push eax
mov byte [ebp - 0xe04], bl
call sub.msvcrt.dll_memset
add esp, 0x14
push 7
mov byte [ebp - 0x30], bl
pop ecx
xor eax, eax
lea edi, [ebp - 0x2f]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x9f8]
push eax
push 0x7f
pop ebx
lea edi, [ebp - 0xcc]
call fcn.00403c2b
pop ecx
mov eax, edi
push 0x3b
push eax
call sub.msvcrt.dll__mbschr
test eax, eax
pop ecx
pop ecx
je 0x40accc
mov byte [eax], 0
lea eax, [ebp - 0xcc]
push eax
push str.MIMEDatabaseContent_Type_s
lea eax, [ebp - 0xe04]
push esi
push eax
call sub.msvcrt.dll__snprintf
push 0x1f
lea eax, [ebp - 0xe04]
push str.Extension
push eax
lea esi, [ebp - 0x30]
call fcn.0040c142
add esp, 0x1c
cmp byte [ebp - 0x30], 0x2e
jne 0x40ad30
cmp dword [ebp - 8], 0
mov eax, esi
je 0x40ad20
push 4
push dword [ebp - 8]
push eax
call sub.msvcrt.dll__mbsnbicmp
add esp, 0xc
test eax, eax
je 0x40ad30
mov eax, esi
push 0x7f
push eax
lea edi, [ebp - 0x4b7]
call fcn.00404553
pop ecx
pop ecx
cmp byte [ebp - 0x4b7], 0
mov esi, str._:____
lea edi, [ebp - 0x44]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
lea esi, [ebp - 0x4b7]
je 0x40ad67
movsx eax, byte [esi]
push eax
lea eax, [ebp - 0x44]
push eax
call sub.msvcrt.dll__mbschr
test eax, eax
pop ecx
pop ecx
je 0x40ad61
mov byte [esi], 0x5f
inc esi
cmp byte [esi], 0
jne 0x40ad4b
cmp dword [ebp - 0x290], 0
mov esi, dword [ebp + 0x10]
mov edi, 0x104
mov ebx, str._s_8.8Xd01
jne 0x40ade2
test dword [esi + 8], 0x30000000
jne 0x40ae01
push edi
lea eax, [ebp - 0x14b]
push 0
push eax
mov byte [ebp - 0x14c], 0
call sub.msvcrt.dll_memset
add esp, 0xc
push dword [esi]
lea eax, [ebp - 0x14c]
push dword [ebp + 0xc]
push ebx
push edi
push eax
call sub.msvcrt.dll__snprintf
lea eax, [ebp - 0x14c]
add esp, 0x14
push eax
call fcn.00403999
cmp eax, 0xffffffff
pop ecx
mov dword [ebp + 0x10], eax
je 0x40ade2
push 0
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
push dword [ebp + 0x10]
mov dword [ebp - 0x290], eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
test dword [esi + 8], 0x30000000
jne 0x40ae01
push dword [esi]
lea eax, [ebp - 0x417]
push dword [ebp + 0xc]
push ebx
push edi
push eax
call sub.msvcrt.dll__snprintf
add esp, 0x14
lea edi, [ebp - 0x260]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
cmp byte [ebp - 0x4b7], 0
lea eax, [ebp - 0x4b7]
je 0x40ae28
cmp byte [eax], 0x5c
jne 0x40ae22
mov byte [eax], 0x5f
inc eax
cmp byte [eax], 0
jne 0x40ae1a
cmp byte [ebp - 0x4b7], 0
lea eax, [ebp - 0x4b7]
je 0x40ae45
cmp byte [eax], 0x2f
jne 0x40ae3f
mov byte [eax], 0x5f
inc eax
cmp byte [eax], 0
jne 0x40ae37
cmp byte [ebp - 0x4b7], 0
lea eax, [ebp - 0x4b7]
je 0x40ae62
cmp byte [eax], 0x3a
jne 0x40ae5c
mov byte [eax], 0x5f
inc eax
cmp byte [eax], 0
jne 0x40ae54
cmp byte [ebp - 0x4b7], 0
lea eax, [ebp - 0x4b7]
je 0x40ae7f
cmp byte [eax], 0x2a
jne 0x40ae79
mov byte [eax], 0x5f
inc eax
cmp byte [eax], 0
jne 0x40ae71
cmp byte [ebp - 0x4b7], 0
lea eax, [ebp - 0x4b7]
je 0x40ae9c
cmp byte [eax], 0x3f
jne 0x40ae96
mov byte [eax], 0x5f
inc eax
cmp byte [eax], 0
jne 0x40ae8e
cmp byte [ebp - 0x4b7], 0
lea eax, [ebp - 0x4b7]
je 0x40aeb9
cmp byte [eax], 0x22
jne 0x40aeb3
mov byte [eax], 0x5f
inc eax
cmp byte [eax], 0
jne 0x40aeab
cmp byte [ebp - 0x4b7], 0
lea eax, [ebp - 0x4b7]
je 0x40aed6
cmp byte [eax], 0x3c
jne 0x40aed0
mov byte [eax], 0x5f
inc eax
cmp byte [eax], 0
jne 0x40aec8
cmp byte [ebp - 0x4b7], 0
lea eax, [ebp - 0x4b7]
je 0x40aef3
cmp byte [eax], 0x3e
jne 0x40aeed
mov byte [eax], 0x5f
inc eax
cmp byte [eax], 0
jne 0x40aee5
cmp byte [ebp - 0x4b7], 0
lea eax, [ebp - 0x4b7]
je 0x40af10
cmp byte [eax], 0x7c
jne 0x40af0a
mov byte [eax], 0x5f
inc eax
cmp byte [eax], 0
jne 0x40af02
mov ecx, dword [ebp + 8]
mov eax, dword [ecx]
lea edx, [ebp - 0xa04]
push edx
call dword [eax]
pop edi
pop esi
pop ebx
leave
ret 0xc