Function at 0x1019f680
Capabilities:
Check if file exists
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1023fe96
mov eax, dword fs:[0]
push eax
sub esp, 0x150
mov eax, dword [0x102e91c0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov edi, dword [ebp + 8]
lea ebx, [esi + 0xf8]
push ebx
lea ecx, [ebp - 0x78]
call fcn.1000fe90
mov dword [ebp - 4], 0
mov ecx, 0x110
cmp dword [esi + 0x33c], 5
mov eax, 0x128
cmovne eax, ecx
add eax, esi
mov ecx, eax
cmp dword [eax + 0x14], 8
jb 0x1019f6e9
mov ecx, dword [eax]
push dword [eax + 0x10]
push ecx
lea ecx, [ebp - 0x78]
call fcn.10010650
push ebx
lea ecx, [ebp - 0x60]
call fcn.1000fe90
mov byte [ebp - 4], 1
lea eax, [esi + 0x128]
cmp dword [edi + 0x10], 0
cmove edi, eax
mov eax, edi
cmp dword [edi + 0x14], 8
jb 0x1019f719
mov eax, dword [edi]
push dword [edi + 0x10]
lea ecx, [ebp - 0x60]
push eax
call fcn.10010650
cmp dword [ebp - 0x4c], 8
lea edi, [ebp - 0x60]
cmovae edi, dword [ebp - 0x60]
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x1019fc7a
mov ecx, dword [0x102eec4c]
test ecx, ecx
je 0x1019f751
cmp byte [0x102eec26], al
jne 0x1019f75c
call fcn.1018f140
mov ecx, dword [0x102eec4c]
mov eax, dword [ecx]
push edi
push str.File_does_not_exist_at__s
push ecx
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x1024852c]
call esi
mov dword [ebp - 0x48], 0
add esp, 0xc
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0xf
mov byte [ebp - 0x48], 0
push 0xb8
lea eax, [ebp - 0x134]
mov byte [ebp - 4], 2
push 0
push eax
call fcn.101d28f0
cmp dword [ebp - 0x64], 8
lea eax, [ebp - 0x78]
lea ecx, [ebp - 0x134]
cmovae eax, dword [ebp - 0x78]
push eax
call fcn.10149cc0
mov eax, dword [ebp - 0x134]
xorps xmm0, xmm0
movq qword [ebp - 0x28], xmm0
mov dword [ebp - 0x20], 0
mov byte [ebp - 0x2b], 0
mov eax, dword [eax + 4]
mov word [ebp - 0x13c], 1
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov ecx, dword [ebp + eax - 0xfc]
test ecx, ecx
mov dword [ebp - 0x20], 0
sete byte [ebp - 0x2c]
mov dword [ebp - 0x1c], ecx
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x13c]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x28]
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x13c], eax
lea eax, [ebp - 0x30]
mov byte [ebp - 4], 4
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.10138500
add esp, 8
test al, al
jne 0x1019f912
cmp byte [ebp - 0x18], 0
mov edi, dword [ebp - 0x1c]
jne 0x1019f884
test edi, edi
je 0x1019f87f
mov eax, dword [edi + 0x1c]
mov ecx, dword [eax]
test ecx, ecx
je 0x1019f864
mov eax, dword [edi + 0x2c]
cmp dword [eax], 0
jle 0x1019f864
movzx eax, byte [ecx]
jmp 0x1019f875
mov eax, dword [edi]
mov esi, dword [eax + 0x18]
mov ecx, esi
call dword [0x1024852c]
mov ecx, edi
call esi
cmp eax, 0xffffffff
je 0x1019f87f
mov byte [ebp - 0x17], al
jmp 0x1019f887
xor edi, edi
mov dword [ebp - 0x1c], edi
mov al, byte [ebp - 0x17]
mov ecx, dword [ebp - 0x24]
mov byte [ebp - 0x135], al
cmp ecx, dword [ebp - 0x20]
je 0x1019f89c
mov byte [ecx], al
inc dword [ebp - 0x24]
jmp 0x1019f8ac
lea eax, [ebp - 0x135]
push eax
push ecx
lea ecx, [ebp - 0x28]
call fcn.101a0580
test edi, edi
je 0x1019f8ef
mov eax, dword [edi + 0x1c]
cmp dword [eax], 0
je 0x1019f8d3
mov ecx, dword [edi + 0x2c]
mov eax, dword [ecx]
test eax, eax
jle 0x1019f8d3
dec eax
mov dword [ecx], eax
mov ecx, dword [edi + 0x1c]
mov edx, dword [ecx]
lea eax, [edx + 1]
mov dword [ecx], eax
movzx eax, byte [edx]
jmp 0x1019f8e4
mov eax, dword [edi]
mov esi, dword [eax + 0x1c]
mov ecx, esi
call dword [0x1024852c]
mov ecx, edi
call esi
cmp eax, 0xffffffff
je 0x1019f8ef
mov byte [ebp - 0x18], 0
jmp 0x1019f8fa
mov dword [ebp - 0x1c], 0
mov byte [ebp - 0x18], 1
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.10138500
add esp, 8
test al, al
je 0x1019f841
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x158], 0
mov dword [ebp - 0x148], 0
mov dword [ebp - 0x144], 0
cmp ecx, eax
jne 0x1019f95b
mov dword [ebp - 0x148], 0
mov dword [ebp - 0x144], 0xf
mov byte [ebp - 0x158], 0
jmp 0x1019f96a
sub eax, ecx
push eax
push ecx
lea ecx, [ebp - 0x158]
call fcn.10010c60
lea edx, [ebp - 0x48]
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x158]
call fcn.10145580
mov byte [ebp - 4], 5
mov bl, al
mov ecx, dword [ebp - 0x144]
cmp ecx, 0x10
jb 0x1019f9bc
mov edx, dword [ebp - 0x158]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x1019f9b2
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1019fcef
push ecx
push edx
call fcn.101d02bd
add esp, 8
mov ecx, dword [0x102eec4c]
mov dword [ebp - 0x148], 0
mov dword [ebp - 0x144], 0xf
mov byte [ebp - 0x158], 0
test bl, bl
je 0x1019fa15
test ecx, ecx
je 0x1019f9ee
cmp byte [0x102eec26], 0
jne 0x1019f9f9
call fcn.1018f140
mov ecx, dword [0x102eec4c]
mov eax, dword [ecx]
push str.successfully_unzipped_the_gzip_response
push ecx
mov esi, dword [eax + 0x14]
mov ecx, esi
call dword [0x1024852c]
call esi
add esp, 8
mov bl, 1
jmp 0x1019fa4c
test ecx, ecx
je 0x1019fa22
cmp byte [0x102eec26], 0
jne 0x1019fa2d
call fcn.1018f140
mov ecx, dword [0x102eec4c]
mov eax, dword [ecx]
push str.Failed_in_Unzipping_the_gzipped_http_response
push 0x1025b044
push ecx
mov esi, dword [eax + 0x24]
mov ecx, esi
call dword [0x1024852c]
call esi
add esp, 0xc
xor bl, bl
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x28]
mov byte [ebp - 0x135], bl
test ecx, ecx
je 0x1019fa9f
mov edx, dword [ebp - 0x20]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x1019fa80
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1019fcf4
push edx
push ecx
call fcn.101d02bd
add esp, 8
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov eax, dword [ebp - 0x134]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ifstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x134]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x70]
mov dword [ebp + ecx - 0x138], eax
lea ecx, [ebp - 0x124]
call fcn.10149c00
mov eax, dword [ebp - 0x134]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_istream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_istream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x134]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x18]
mov dword [ebp + ecx - 0x138], eax
lea eax, [ebp - 0xc4]
mov byte [ebp - 4], 7
push eax
mov dword [ebp - 0xc4], vtable.std::ios_base.0
call fcn.101cd904
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x78]
add esp, 4
lea edx, [ebp - 0x13c]
cmp dword [ebp - 0x64], 8
cmovae ecx, dword [ebp - 0x78]
call fcn.101935d0
test bl, bl
je 0x1019fc32
cmp dword [ebp - 0x4c], 8
lea eax, [ebp - 0x60]
push 0
cmovae eax, dword [ebp - 0x60]
push 0x80
push 2
push 0
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, eax
mov dword [ebp - 0x13c], ecx
cmp ecx, 0xffffffff
jne 0x1019fbbe
mov ebx, dword [0x102eec4c]
test ebx, ebx
je 0x1019fb7b
cmp byte [0x102eec26], 0
jne 0x1019fb86
call fcn.1018f140
mov ebx, dword [0x102eec4c]
cmp dword [ebp - 0x4c], 8
lea edi, [ebp - 0x60]
mov esi, dword [ebx]
cmovae edi, dword [ebp - 0x60]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [esi + 0x24]
mov ecx, esi
push eax
push edi
push str.Failed_to_create_file_at_path_:_s_Error:_d
push 0x1025b044
push ebx
call dword [0x1024852c]
call esi
mov bl, byte [ebp - 0x135]
add esp, 0x14
jmp 0x1019fc32
cmp dword [ebp - 0x34], 0x10
lea edx, [ebp - 0x18]
push 0
push edx
push dword [ebp - 0x38]
lea eax, [ebp - 0x48]
mov dword [ebp - 0x18], 0
cmovae eax, dword [ebp - 0x48]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1019fc26
mov edi, dword [0x102eec4c]
test edi, edi
je 0x1019fbf7
cmp byte [0x102eec26], al
jne 0x1019fc02
call fcn.1018f140
mov edi, dword [0x102eec4c]
mov esi, dword [edi]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [esi + 0x24]
mov ecx, esi
push eax
push str.Failed_to_write_in_file_ERROR_VAL:_d_n
push 0x1025b044
push edi
call dword [0x1024852c]
call esi
add esp, 0x10
push dword [ebp - 0x13c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x34]
cmp ecx, 0x10
jb 0x1019fc66
mov edx, dword [ebp - 0x48]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x1019fc5c
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1019fcf9
push ecx
push edx
call fcn.101d02bd
add esp, 8
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0xf
mov byte [ebp - 0x48], 0
jmp 0x1019fcbf
push 0x50
push str.Failed_to_unzip_the_file_as_there_is_already_another_file_with_that_name_present
lea ecx, [esi + 0x348]
mov dword [esi + 0x340], 0xffffff9c
call fcn.10010360
cmp dword [ebp - 0x64], 8
lea ecx, [ebp - 0x78]
lea edx, [ebp - 0x13c]
mov dword [esi + 0x368], 0
cmovae ecx, dword [ebp - 0x78]
mov byte [esi + 0x364], 1
call fcn.101935d0
xor bl, bl
lea ecx, [ebp - 0x60]
call fcn.1000ae90
lea ecx, [ebp - 0x78]
call fcn.1000ae90
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.101cff65
mov esp, ebp
pop ebp
ret 4
call fcn.101dc0ba
call fcn.101dc0ba
call fcn.101dc0ba
int3