Function at 0x423a40
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43b18f
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x2518
call fcn.00437df0
mov eax, dword [0x44e7a0]
push ebx
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 8]
test eax, eax
push esi
push edi
mov dword [ebp - 0x10], esp
je 0x423b19
mov edi, dword [ebp + 0x14]
test edi, edi
je 0x423b19
push str.CDownloadUrlTransfer
lea ecx, [ebp - 0x22fc]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov ebx, dword [ebp + 0x10]
mov esi, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0x18]
push edi
push ebx
push esi
push eax
push 0x441920
lea ecx, [ebp - 0x22fc]
push ecx
add edx, 0x27c
push 0
push edx
mov dword [ebp - 4], 0
call dword [sym.imp.KwLogSvr.dll_void___cdecl_YL_Log_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___int__class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__]
add esp, 0x20
lea ecx, [ebp - 0x22fc]
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
sub ebx, esi
inc ebx
test ebx, ebx
jle 0x423b19
push 0
call fcn.004312d0
mov esi, eax
add esp, 4
test esi, esi
mov dword [ebp - 0x22dc], esi
je 0x423b19
push ebx
call sub.MSVCR71.dll_void____cdecl_operator_new___unsigned_int_
add esp, 4
test eax, eax
mov dword [ebp - 0x22c4], eax
jne 0x423b34
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax + 0x34]
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x14]
call fcn.00437d67
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x68]
mov byte [ebp - 0x22bd], 0
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
lea ecx, [ebp - 0x30]
mov dword [ebp - 4], 1
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
lea ecx, [ebp - 0x84]
mov byte [ebp - 4], 2
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 3
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
mov ecx, dword [ebp + 8]
push ecx
lea ecx, [ebp - 0x68]
mov byte [ebp - 4], 4
call dword [0x43d1b0]
push edi
lea ecx, [ebp - 0x4c]
call dword [0x43d1b0]
lea edx, [ebp - 0x84]
push edx
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x68]
push ecx
call fcn.0042ed80
xor eax, eax
mov dword [ebp - 0x22d8], eax
mov word [ebp - 0x22d4], ax
mov eax, dword [ebp - 0x18]
mov edi, 0x10
add esp, 0xc
cmp eax, edi
mov eax, dword [ebp - 0x2c]
jae 0x423bc4
lea eax, [ebp - 0x2c]
push 0x50
push eax
lea ecx, [ebp - 0x22d8]
call fcn.00430e90
mov edx, dword [esi]
or eax, 0xffffffff
mov dword [ebp - 0x22cc], eax
mov dword [ebp - 0x22d0], eax
lea eax, [ebp - 0x22d8]
push eax
mov ecx, esi
mov byte [ebp - 4], 5
call dword [edx + 0x3c]
mov edx, dword [esi]
push 0x1f40
mov ecx, esi
call dword [edx + 0x20]
mov eax, dword [esi]
push 0x1f40
mov ecx, esi
call dword [eax + 0x24]
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x44]
push esi
lea ecx, [ebp - 0x22bc]
call fcn.004021f0
cmp dword [ebp - 0x18], edi
mov eax, dword [ebp - 0x2c]
mov byte [ebp - 0x85], 0
jae 0x423c30
lea eax, [ebp - 0x2c]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
push ecx
push edx
push eax
mov eax, dword [ebp + 8]
push eax
push str.GET__s_HTTP_1.1_r_nHost:__s_r_nAccept:___r_nUser_Agent:_Mozilla_4.0__compatible__MSIE_6.0__Windows_NT_5.0__.NET_CLR_1.1.4322__r_nRange:_bytes_u__u_r_nPragma:_no_cache_r_nCache_Control:_no_cache_r_nConnection:_close_r_n_r_n
lea ecx, [ebp - 0x284]
push 0x1ff
push ecx
call dword [sym.imp.MSVCR71.dll__snprintf]
lea eax, [ebp - 0x284]
add esp, 0x1c
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x423c60
sub eax, edx
mov edx, dword [esi]
push eax
lea eax, [ebp - 0x284]
push eax
mov ecx, esi
call dword [edx + 8]
lea ecx, [ebp - 0x22bc]
call fcn.00410140
cmp eax, 0xc8
je 0x423cc2
cmp eax, 0xce
je 0x423cc2
push eax
push str.HTTP_Reply_Code_Error
lea ecx, [ebp - 0x239c]
call fcn.00409960
mov esi, eax
mov ecx, 0x21
lea edi, [ebp - 0x2528]
rep movsd dword es:[edi], dword [esi]
push 0x446b4c
lea ecx, [ebp - 0x2528]
push ecx
call sub.MSVCR71.dll__CxxThrowException
lea ecx, [ebp - 0x22bc]
call fcn.004101a0
test al, al
jne 0x423cc2
mov eax, dword [ebp - 0x22c4]
mov edx, dword [esi]
push ebx
push eax
mov ecx, esi
call dword [edx]
mov dword [ebp + 8], eax
cmp dword [ebp - 0x34], edi
mov eax, dword [ebp - 0x48]
jae 0x423ced
lea eax, [ebp - 0x48]
push 0
push 0x80
push 4
push 0
push 3
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0x22cc], edi
je 0x423dd6
cmp dword [ebp + 8], ebx
jne 0x423dd6
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
push 0
push edi
mov dword [ebp - 0x22c8], 0
call ebx
mov ecx, dword [ebp - 0x22d0]
push 0
push 0
push 0
push ecx
call ebx
mov ebx, dword [ebp + 8]
mov eax, dword [ebp - 0x22c4]
push 0
lea edx, [ebp - 0x22c8]
push edx
push ebx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x423d9f
cmp dword [ebp - 0x22c8], ebx
jne 0x423e8b
mov eax, dword [ebp + 0x18]
test eax, eax
mov byte [ebp - 0x22bd], 1
je 0x423e8b
mov eax, dword [eax + 0x278]
test eax, eax
je 0x423e8b
mov byte [eax + 0xe3], 1
jmp 0x423e8b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Write_file_failed
lea ecx, [ebp - 0x239c]
call fcn.00409960
mov esi, eax
mov ecx, 0x21
lea edi, [ebp - 0x24a4]
rep movsd dword es:[edi], dword [esi]
push 0x446b4c
lea ecx, [ebp - 0x24a4]
push ecx
call sub.MSVCR71.dll__CxxThrowException
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x7f
lea edx, [ebp - 0x239c]
push 0x441828
push edx
mov esi, eax
call dword [sym.imp.MSVCR71.dll_strncpy]
add esp, 0xc
mov dword [ebp - 0x231c], esi
push 0x446b4c
lea eax, [ebp - 0x2420]
mov byte [ebp - 0x231d], 0
mov ecx, 0x21
lea esi, [ebp - 0x239c]
lea edi, [ebp - 0x2420]
push eax
rep movsd dword es:[edi], dword [esi]
call sub.MSVCR71.dll__CxxThrowException
push str.CDownloadUrlTransfer
lea ecx, [ebp - 0x2318]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov eax, dword [ebp - 0x22e0]
mov ecx, dword [eax + 0x80]
push ecx
push eax
mov eax, dword [ebp + 0x18]
push 0x44180c
lea edx, [ebp - 0x2318]
push edx
add eax, 0x27c
push 0
push eax
mov byte [ebp - 4], 7
call dword [sym.imp.KwLogSvr.dll_void___cdecl_YL_Log_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___int__class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__]
add esp, 0x18
lea ecx, [ebp - 0x2318]
mov byte [ebp - 4], 6
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov eax, 0x423e7f
ret
mov ecx, dword [ebp - 0x22c4]
push ecx
mov dword [ebp - 4], 4
call sub.MSVCR71.dll_void___cdecl_operator_delete___void__
mov edx, dword [esi]
add esp, 4
mov ecx, esi
call dword [edx + 0x1c]
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax + 0x34]
cmp edi, 0xffffffff
je 0x423ebd
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x22d0]
cmp eax, 0xffffffff
je 0x423ecf
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 3
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [ebp - 0x84]
mov byte [ebp - 4], 2
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 1
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [ebp - 0x68]
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov al, byte [ebp - 0x22bd]
jmp 0x423b1b