Function at 0x406810
Capabilities:
Terminate process

Disassembly:
sub esp, 0x4c
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x44], eax
push ebx
mov ebx, edx
push ebp
mov edx, dword [ebx + 0x5c]
push esi
mov ebp, ecx
push edi
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x30], ebp
test edx, edx
je 0x406d94
mov esi, edx
lea edi, [esi + 1]
mov edi, edi
mov al, byte [esi]
inc esi
test al, al
jne 0x406840
sub esi, edi
cmp esi, dword [ebx + 0x60]
je 0x406858
push 0x190
jmp 0x406d9b
test edx, edx
je 0x406d94
push 0
push edx
call dword [sym.imp.MSVCR110.dll__open]
add esp, 8
test eax, eax
js 0x406d94
lea ecx, [ebx + 0xfc]
mov dword [esp + 0x2c], ecx
mov dword [ecx], 0
mov dword [ecx + 4], 0
mov edx, dword [ebx + 0xd0]
mov ecx, dword [ebx + 0xcc]
or dword [ebx + 0xf8], 1
xorps xmm0, xmm0
mov dword [ebx + 0x104], eax
mov dword [esp + 0x20], 0
movq qword [esp + 0x24], xmm0
call fcn.00403a50
mov edx, dword [ebx + 0x48]
test eax, eax
mov ecx, str.application_octet_stream
cmovne ecx, eax
mov dword [esp + 0x18], ecx
push 1
push 0xc8
lea ecx, [esp + 0x28]
call fcn.00402fd0
add esp, 8
cmp dword [esp + 0x20], 0
jne 0x40690c
push 0
mov edx, 0x1f4
mov ecx, ebx
call fcn.004050d0
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x44]
xor ecx, esp
call fcn.0040995e
add esp, 0x4c
ret
push 1
mov edx, ebx
lea ecx, [esp + 0x24]
call fcn.00403730
mov esi, dword [esp + 0x24]
mov ebp, dword [sym.imp.MSVCR110.dll_realloc]
add esp, 4
test esi, esi
jne 0x40694f
xor ebx, ebx
mov eax, 0xe
push 0x4f
push ebx
mov dword [esp + 0x1c], eax
lea edi, [ebx + 0x4e]
call ebp
mov esi, eax
add esp, 8
test esi, esi
je 0x406a6c
lea edx, [ebx + 0xe]
jmp 0x40697f
mov ebx, dword [esp + 0x24]
mov edi, dword [esp + 0x28]
lea edx, [ebx + 0xe]
mov dword [esp + 0x14], edx
cmp edx, edi
jb 0x40697f
lea edi, [edx + 0x80]
lea eax, [edi + 1]
push eax
push esi
call ebp
mov esi, eax
add esp, 8
test esi, esi
je 0x406a6c
lea edx, [ebx + 0xe]
movq xmm0, qword [str.Content_Type:]
movq qword [ebx + esi], xmm0
mov eax, dword [0x40d7a4]
mov dword [ebx + esi + 8], eax
mov ax, word [0x40d7a8]
mov word [ebx + esi + 0xc], ax
test esi, esi
jne 0x4069d2
mov ebx, dword [esp + 0x18]
xor eax, eax
mov dword [esp + 0x14], eax
lea ecx, [ebx + 1]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x4069b1
sub ebx, ecx
mov edi, 0x4e
cmp ebx, 0x4e
jb 0x4069ca
lea edi, [ebx + 0x80]
lea eax, [edi + 1]
push eax
push 0
jmp 0x4069fb
mov ecx, dword [esp + 0x18]
lea ebx, [ecx + 1]
lea esp, [esp]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4069e0
sub ecx, ebx
lea ebx, [ecx + edx]
cmp ebx, edi
jb 0x406a0a
lea edi, [ebx + 0x80]
lea eax, [edi + 1]
push eax
push esi
call ebp
mov esi, eax
add esp, 8
test esi, esi
je 0x406a6c
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
lea eax, [ecx + 1]
mov dword [esp + 0x14], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x406a15
sub ecx, dword [esp + 0x14]
lea eax, [edx + esi]
push ecx
push dword [esp + 0x1c]
push eax
call sub.MSVCR110.dll_memcpy
add esp, 0xc
push 5
push str.text_
push dword [esp + 0x20]
call dword [sym.imp.MSVCR110.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x406afb
test esi, esi
jne 0x406a8c
xor ebx, ebx
push 0x4f
push ebx
mov dword [esp + 0x1c], 0xf
lea edi, [eax + 0x4e]
call ebp
mov esi, eax
add esp, 8
test esi, esi
jne 0x406acd
push str.Out_of_memory_n
call dword [sym.imp.MSVCR110.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR110.dll_fprintf]
add esp, 8
push 1
call dword [sym.imp.MSVCR110.dll_exit]
lea eax, [ebx + 0xf]
mov dword [esp + 0x14], eax
cmp eax, edi
jb 0x406acd
lea edi, [eax + 0x80]
lea eax, [edi + 1]
push eax
push esi
call ebp
mov esi, eax
add esp, 8
test esi, esi
jne 0x406acd
push str.Out_of_memory_n
call dword [sym.imp.MSVCR110.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR110.dll_fprintf]
add esp, 8
push 1
call dword [sym.imp.MSVCR110.dll_exit]
movq xmm0, qword [str.__charsetUTF_8]
movq qword [ebx + esi], xmm0
mov eax, dword [0x40d7bc]
mov dword [ebx + esi + 8], eax
mov ax, word [0x40d7c0]
mov word [ebx + esi + 0xc], ax
mov al, byte [0x40d7c2]
mov byte [ebx + esi + 0xe], al
mov ebx, dword [esp + 0x14]
test esi, esi
jne 0x406b24
xor ebx, ebx
mov eax, 2
push 0x4f
push ebx
mov dword [esp + 0x1c], eax
lea edi, [esi + 0x4e]
call ebp
mov esi, eax
add esp, 8
test esi, esi
je 0x406a6c
lea eax, [ebx + 2]
jmp 0x406b4c
lea eax, [ebx + 2]
mov dword [esp + 0x14], eax
cmp eax, edi
jb 0x406b4c
lea edi, [eax + 0x80]
lea eax, [edi + 1]
push eax
push esi
call ebp
mov esi, eax
add esp, 8
test esi, esi
je 0x406a6c
lea eax, [ebx + 2]
mov ecx, 0xa0d
mov word [ebx + esi], cx
test esi, esi
jne 0x406b6f
xor eax, eax
push 0x4f
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], 0x10
lea edi, [esi + 0x4e]
push eax
jmp 0x406b85
lea ecx, [eax + 0x10]
mov dword [esp + 0x18], ecx
cmp ecx, edi
jb 0x406b98
lea edi, [ecx + 0x80]
lea eax, [edi + 1]
push eax
push esi
call ebp
mov esi, eax
add esp, 8
test esi, esi
je 0x406a6c
mov eax, dword [esp + 0x14]
movq xmm0, qword [str.Content_Length:]
mov ebx, dword [esp + 0x1c]
movq qword [eax + esi], xmm0
movq xmm0, qword [0x40d770]
movq qword [eax + esi + 8], xmm0
mov ebx, dword [ebx + 0xe8]
lea ebp, [esp + 0x53]
mov byte [esp + 0x53], 0
mov eax, 0xcccccccd
mul ebx
shr edx, 3
mov al, dl
shl al, 2
dec ebp
lea ecx, [eax + edx]
add cl, cl
sub bl, cl
add bl, 0x30
mov byte [ebp], bl
mov ebx, edx
test ebx, ebx
jne 0x406bc6
mov dword [esp + 0x14], ebp
mov ebp, dword [sym.imp.MSVCR110.dll_realloc]
lea ebx, [esp + 0x53]
test esi, esi
jne 0x406c27
sub ebx, dword [esp + 0x14]
mov dword [esp + 0x18], edx
lea edi, [edx + 0x4e]
cmp ebx, 0x4e
jb 0x406c11
lea edi, [ebx + 0x80]
lea eax, [edi + 1]
push eax
push 0
call ebp
mov esi, eax
add esp, 8
test esi, esi
jne 0x406c4d
jmp 0x406a6c
sub ebx, dword [esp + 0x14]
add ebx, dword [esp + 0x18]
cmp ebx, edi
jb 0x406c4d
lea edi, [ebx + 0x80]
lea eax, [edi + 1]
push eax
push esi
call ebp
mov esi, eax
add esp, 8
test esi, esi
je 0x406a6c
lea eax, [esp + 0x53]
sub eax, dword [esp + 0x14]
push eax
mov eax, dword [esp + 0x1c]
push dword [esp + 0x18]
add eax, esi
push eax
call sub.MSVCR110.dll_memcpy
add esp, 0xc
test esi, esi
jne 0x406c92
xor ebx, ebx
mov eax, 2
push 0x4f
push ebx
mov dword [esp + 0x1c], eax
lea edi, [esi + 0x4e]
call ebp
mov esi, eax
add esp, 8
test esi, esi
je 0x406a6c
lea eax, [ebx + 2]
jmp 0x406cba
lea eax, [ebx + 2]
mov dword [esp + 0x14], eax
cmp eax, edi
jb 0x406cba
lea edi, [eax + 0x80]
lea eax, [edi + 1]
push eax
push esi
call ebp
mov esi, eax
add esp, 8
test esi, esi
je 0x406a6c
lea eax, [ebx + 2]
mov ecx, 0xa0d
mov word [ebx + esi], cx
test esi, esi
jne 0x406cd5
xor eax, eax
push 0x4f
mov dword [esp + 0x18], eax
lea ebx, [esi + 2]
push eax
jmp 0x406ce4
lea ebx, [eax + 2]
cmp ebx, edi
jb 0x406cf7
lea eax, [ebx + 0x81]
push eax
push esi
call ebp
mov esi, eax
add esp, 8
test esi, esi
je 0x406a6c
mov eax, dword [esp + 0x14]
mov ebp, 0xa0d
push ebx
mov edx, esi
mov ecx, esi
mov word [eax + esi], bp
call fcn.00404da0
add esp, 4
test eax, eax
jne 0x406d48
test esi, esi
je 0x406d1f
push esi
call dword [sym.imp.MSVCR110.dll_free]
add esp, 4
mov ecx, dword [esp + 0x1c]
push 0
mov edx, 0x1f4
call fcn.004050d0
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x44]
xor ecx, esp
call fcn.0040995e
add esp, 0x4c
ret
mov ecx, dword [esp + 0x2c]
mov edx, eax
call fcn.00404d20
mov ebx, dword [esp + 0x1c]
push 0
mov edx, 0xc8
mov ecx, ebx
call fcn.004050d0
mov ecx, dword [esp + 0x34]
add esp, 4
push dword [ebx + 4]
add ecx, 4
mov edx, 0x10
call fcn.00404af0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x44]
xor ecx, esp
call fcn.0040995e
add esp, 0x4c
ret
push 0x194
mov ecx, ebp
mov edx, ebx
call fcn.00406020
mov ecx, dword [esp + 0x58]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040995e
add esp, 0x4c
ret