Function at 0x1001dd60
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x868
push ebx
push ebp
push esi
mov esi, dword [esp + 0x87c]
xor ebp, ebp
push edi
cmp esi, ebp
jne 0x1001dd86
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x868
ret 8
push ebp
push 0x80
push 2
push ebp
push 3
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
mov dword [esp + 0x14], edi
jne 0x1001ddb7
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x868
ret 8
push esi
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
mov ebx, dword [esp + 0x87c]
push ebx
call fcn.1001dc60
test eax, eax
jne 0x1001dde5
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x868
ret 8
mov ecx, 0x14
mov esi, str.GET__s_HTTP_1.1_r_nUser_Agent:_Mozilla_4.0_r_nHost:__s_r_nCache_Control:_no_cache_r_n_r_n
lea edi, [esp + 0x24]
lea eax, [ebx + 0x100]
rep movsd dword es:[edi], dword [esi]
push ebx
lea ecx, [esp + 0x28]
push eax
push ecx
lea edx, [esp + 0x80]
push 0x800
push edx
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x14
lea eax, [esp + 0x74]
mov dword [esp + 0x18], ebp
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ecx, [esp + 0x74]
push eax
push ecx
push ebx
call fcn.1001dfc0
test eax, eax
je 0x1001df95
mov ebx, dword [sym.imp.SHLWAPI.dll_StrStrA]
mov dword [esp + 0x10], ebp
xor esi, esi
lea ebp, [esp + 0x74]
mov eax, dword [esp + 0x87c]
mov edx, 0x800
sub edx, esi
push edx
push ebp
push eax
call fcn.1001e0b0
test eax, eax
jle 0x1001df95
add esi, eax
lea ecx, [esp + 0x74]
push str._r_n_r_n
push ecx
lea ebp, [esp + esi + 0x7c]
mov byte [ebp], 0
call ebx
mov edi, eax
test edi, edi
jne 0x1001de92
cmp esi, 0x800
jl 0x1001de4b
jmp 0x1001df95
mov ebp, dword [sym.imp.MSVCRT.dll_sscanf]
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x78]
push str._s__d__s
push eax
mov dword [esp + 0x28], 0
call ebp
mov eax, dword [esp + 0x28]
add esp, 0xc
cmp eax, 0xc8
jne 0x1001df95
lea ecx, [esp + 0x74]
push str.Content_Length:
push ecx
call dword [sym.imp.SHLWAPI.dll_StrStrIA]
test eax, eax
je 0x1001df95
lea edx, [esp + 0x10]
add eax, 0xf
push edx
push 0x10087108
push eax
call ebp
lea eax, [esp + 0x80]
add esp, 0xc
sub edi, eax
add edi, 4
cmp esi, 0x800
jl 0x1001df0a
test edi, edi
je 0x1001df95
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
cmp esi, edi
jle 0x1001df3a
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x20]
sub esi, edi
push 0
push ecx
lea edx, [esp + edi + 0x7c]
push esi
push edx
push eax
call ebx
test eax, eax
je 0x1001df95
mov eax, dword [esp + 0x10]
sub eax, esi
mov dword [esp + 0x10], eax
jmp 0x1001df3e
mov eax, dword [esp + 0x10]
test eax, eax
jle 0x1001df8d
cmp eax, 0x800
jle 0x1001df4e
mov eax, 0x800
mov edx, dword [esp + 0x87c]
lea ecx, [esp + 0x74]
push eax
push ecx
push edx
call fcn.1001e0b0
mov esi, eax
test esi, esi
jle 0x1001df95
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x20]
push 0
push eax
lea ecx, [esp + 0x7c]
push esi
push ecx
push edx
call ebx
test eax, eax
je 0x1001df95
mov eax, dword [esp + 0x10]
sub eax, esi
test eax, eax
mov dword [esp + 0x10], eax
jg 0x1001df42
mov dword [esp + 0x18], 1
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x87c]
push ecx
call fcn.1001dc30
pop edi
pop esi
mov eax, dword [esp + 0x10]
pop ebp
pop ebx
add esp, 0x868
ret 8