Function at 0x473d90
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
sub esp, 8
push ebx
push esi
push edi
mov edi, ecx
test eax, eax
je 0x473f8f
cmp eax, 1
jne 0x473dc4
mov eax, str.text_html
push eax
push str.Content_Type
call fcn.00473d20
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp eax, 2
jne 0x473de2
mov eax, str.image_x_icon
push eax
push str.Content_Type
call fcn.00473d20
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp eax, 3
jne 0x473f9a
cmp dword [edi + 0x64], 0
je 0x474012
mov eax, dword [edi + 0x28]
add eax, 0x70
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [edi + 0x28]
mov eax, dword [edi + 0x64]
mov ecx, dword [ebx + 0x88]
mov dword [ebp - 8], ecx
cmp dword [ecx + 4], 0xffffffff
jne 0x473e38
lea edx, [ebp + 8]
push edx
lea edx, [ebp - 8]
push edx
push eax
call fcn.00415590
mov esi, dword [ebp + 8]
test esi, esi
je 0x473ed7
mov esi, dword [esi + 0x10]
jmp 0x473eda
test eax, eax
je 0x473ed7
mov ecx, eax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x473e45
mov esi, dword [ebp - 4]
sub ecx, edx
sar ecx, 1
test esi, esi
jne 0x473e5f
xor edx, edx
jmp 0x473e77
mov edx, esi
lea eax, [edx + 2]
mov dword [ebp + 8], eax
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x473e67
sub edx, dword [ebp + 8]
sar edx, 1
lea eax, [edx + 9]
add eax, ecx
mov dword [ebp + 8], eax
cmp eax, 0x40
jae 0x473eda
mov ebx, dword [ebp - 8]
mov eax, dword [edi + 0x64]
mov ecx, dword [ebx + 0xc]
test esi, esi
jne 0x473ea6
push eax
push 0x504bd4
push 0xffffffffffffffff
push 0x40
push ecx
call fcn.00415570
add esp, 0x14
jmp 0x473eba
push esi
push eax
push str.__s_____s__r_n
push 0xffffffffffffffff
push 0x40
push ecx
call fcn.00415570
add esp, 0x18
push 0
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp + 8]
add eax, eax
push eax
push dword [ebx + 0xc]
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, dword [edi + 0x28]
jmp 0x473eda
mov esi, dword [ebp - 4]
lea eax, [ebx + 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test esi, esi
je 0x474012
mov ecx, dword [edi + 0x5c]
movq xmm0, qword [str.Content_Type]
push 0
push 0
movq qword [ecx], xmm0
mov eax, dword [0x50df44]
mov dword [ecx + 8], eax
mov eax, dword [edi + 0x5c]
push 0x1f2
mov byte [eax + 0xc], 0x3a
mov eax, dword [edi + 0x5c]
mov byte [eax + 0xd], 0x20
mov eax, dword [edi + 0x5c]
add eax, 0xe
push eax
push 0xffffffffffffffff
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ecx, 0x200
lea edx, [eax + 0xd]
sub ecx, edx
cmp ecx, 3
jb 0x474012
mov ecx, dword [edi + 0x5c]
mov byte [edx + ecx], 0xd
mov eax, dword [edi + 0x5c]
mov byte [edx + eax + 1], 0xa
mov eax, dword [edi + 0x5c]
mov byte [eax + edx + 2], 0
mov edx, dword [edi + 0x5c]
mov esi, edx
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x473f60
mov eax, dword [edi + 0x3c]
sub esi, ecx
mov ecx, dword [edi + 0x44]
sub eax, ecx
cmp eax, esi
jbe 0x474012
lea eax, [esi + 1]
push eax
mov eax, dword [edi + 0x38]
push edx
add eax, ecx
push eax
call fcn.004d6950
add esp, 0xc
add dword [edi + 0x44], esi
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp eax, 4
jne 0x473fb8
mov eax, str.application_x_javascript
push eax
push str.Content_Type
call fcn.00473d20
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp eax, 5
jne 0x473fd6
mov eax, str.application_xml
push eax
push str.Content_Type
call fcn.00473d20
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp eax, 6
jne 0x473ff4
mov eax, str.text_plain
push eax
push str.Content_Type
call fcn.00473d20
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp eax, 7
jne 0x474012
mov eax, str.text_css
push eax
push str.Content_Type
call fcn.00473d20
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 4