Function at 0x10031740
Capabilities:
Print debug messages

Disassembly:
push 0xffffffffffffffff
push 0x10043ca9
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x1005e3c8]
xor eax, esp
mov dword [esp + 0x38], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x1005e3c8]
xor eax, esp
push eax
lea eax, [esp + 0x50]
mov dword fs:[0], eax
mov esi, dword [esp + 0x60]
push str.DownloadFileThread_Start_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call dword [sym.imp.xwmfUI.dll_public:_static_class_XFClientUI____cdecl_XFClientUI::getInstance_void_]
xor edi, edi
push edi
push edi
mov dword [esp + 0x20], eax
call dword [sym.imp.XecureMacuxCSM.dll_public:_static_class_XWClientSM____cdecl_XWClientSM::getInstance_char_const___unsigned_long_int_]
add esp, 8
lea ecx, [esp + 0x30]
mov dword [esp + 0x28], eax
xor ebp, ebp
mov dword [esp + 0x1c], edi
mov dword [esp + 0x24], edi
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
mov eax, dword [sym.NativeMng.dll_class_NativeFCMSWrapper__NativeFCMSWrapper::mNativeFCMSWrapper]
mov dword [eax], 0xffffffff
cmp dword [esi + 0x38], edi
mov dword [esp + 0x58], edi
mov dword [esp + 0x14], edi
jbe 0x10031c88
mov dword [esp + 0x20], edi
test dword [esi + 0x40], 0x80000
jne 0x100317e8
mov ecx, dword [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x1c]
call dword [sym.imp.xwmfUI.dll_public:_void___thiscall_XFClientUI::setProgressIndex_int_]
mov eax, dword [esi + 0xc]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x100317f0
sub eax, edx
mov edi, eax
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x10031822
mov ecx, dword [esi + 0x20]
sub ecx, eax
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp dword [esp + 0x14], eax
jb 0x10031828
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov eax, dword [esi + 0x1c]
mov ebx, dword [esp + 0x20]
add eax, ebx
mov eax, dword [eax + 0x14]
lea edi, [edi + eax + 0xb]
push edi
call dword [sym.imp.MSVCR80.dll_malloc]
push edi
mov ebp, eax
push 0
push ebp
call sub.MSVCR80.dll_memset
mov eax, dword [esi + 0x1c]
add esp, 0x10
test eax, eax
je 0x10031872
mov ecx, dword [esi + 0x20]
sub ecx, eax
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp dword [esp + 0x14], eax
jb 0x10031878
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov eax, dword [esi + 0x1c]
add eax, ebx
cmp dword [eax + 0x18], 0x10
jb 0x10031888
mov eax, dword [eax + 4]
jmp 0x1003188b
add eax, 4
mov edx, dword [esi + 0xc]
push edx
push eax
push str.filename_s_s
push edi
push ebp
call dword [sym.imp.MSVCR80.dll_sprintf_s]
mov eax, dword [esi + 8]
mov ecx, dword [esi + 4]
mov edx, dword [esi]
add esp, 0x14
push 0x1004e674
push ebp
push eax
push ecx
mov ecx, dword [esp + 0x38]
push edx
call dword [sym.imp.XecureMacuxCSM.dll_public:_char____thiscall_XWClientSM::blockEnc_unsigned_long_int__char_const___char_const___char_const___char_const__]
test eax, eax
mov dword [esp + 0x1c], eax
je 0x10031c22
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x100318d0
sub eax, edx
je 0x10031c22
mov eax, dword [esi + 0x2c]
test eax, eax
lea ebx, [esi + 0x28]
je 0x10031909
mov ecx, dword [ebx + 8]
sub ecx, eax
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp dword [esp + 0x14], eax
jb 0x1003190f
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov eax, dword [ebx + 4]
add eax, dword [esp + 0x20]
lea ecx, [esp + 0x30]
push eax
call dword [0x1004613c]
test dword [esi + 0x40], 0x20000
jne 0x1003194a
mov ecx, dword [sym.NativeMng.dll_class_NativeFCMSWrapper__NativeFCMSWrapper::mNativeFCMSWrapper]
push str..tmp
push str._xwmftmp
call sym.NativeMng.dll_public:_char____thiscall_NativeFCMSWrapper::getTempFileName_char___char__
push eax
lea ecx, [esp + 0x34]
call dword [0x1004612c]
cmp dword [esp + 0x48], 0x10
mov edi, dword [esp + 0x34]
jae 0x10031959
lea edi, [esp + 0x34]
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x1003197e
mov ecx, dword [esi + 0x20]
sub ecx, eax
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp dword [esp + 0x14], eax
jb 0x10031984
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov eax, dword [esi + 0x1c]
add eax, dword [esp + 0x20]
cmp dword [eax + 0x18], 0x10
jb 0x10031996
mov ecx, dword [eax + 4]
jmp 0x10031999
lea ecx, [eax + 4]
mov eax, dword [esi + 0x40]
mov edx, eax
and edx, 0x80000
neg edx
sbb edx, edx
not edx
and edx, sym.NativeMng.dll_protected:_static_int___cdecl_NativeFCMSWrapper::ProgressCallback_void___char_const___long_long___int64___long_long___int64___int_
push edx
mov edx, dword [esi + 0x3c]
push eax
mov eax, dword [esp + 0x24]
push eax
mov eax, dword [esi + 0x14]
push edx
mov edx, dword [esi + 0xc]
push edi
push ecx
mov ecx, dword [esi + 0x10]
push eax
mov eax, dword [esi + 8]
push ecx
mov ecx, dword [esi + 4]
push edx
mov edx, dword [esi]
push eax
push ecx
mov ecx, dword [esp + 0x54]
push edx
call dword [sym.imp.XecureMacuxCSM.dll_public:_char____thiscall_XWClientSM::downloadFile_unsigned_long_int__char_const___char_const___char_const___char_const___int__char_const___char_const___char_const___char_const___int__int____cdecl___void___char_const___long_long___int64___long_long___int64___int__]
mov edi, eax
test edi, edi
je 0x10031ae4
cmp byte [edi], 0
je 0x10031ae4
push 6
push str.CANCEL
push edi
call dword [sym.imp.MSVCR80.dll_strncmp]
add esp, 0xc
test eax, eax
je 0x10031bce
cmp dword [esp + 0x14], 0
jle 0x10031a25
mov ecx, dword [sym.NativeMng.dll_class_NativeFCMSWrapper__NativeFCMSWrapper::mNativeFCMSWrapper]
push 0x100466ec
add ecx, 4
call dword [0x1004612c]
mov eax, dword [esp + 0x14]
push eax
mov ecx, ebx
call fcn.1002e7c0
cmp dword [eax + 0x18], 0x10
jb 0x10031a3c
mov eax, dword [eax + 4]
jmp 0x10031a3f
add eax, 4
mov ecx, dword [sym.NativeMng.dll_class_NativeFCMSWrapper__NativeFCMSWrapper::mNativeFCMSWrapper]
push eax
add ecx, 4
call dword [0x1004612c]
test dword [esi + 0x40], 0x20000
jne 0x10031abe
mov ecx, dword [esp + 0x14]
push ecx
mov ecx, ebx
call fcn.1002e7c0
cmp dword [eax + 0x18], 0x10
jb 0x10031a6f
mov eax, dword [eax + 4]
jmp 0x10031a72
add eax, 4
mov ecx, dword [sym.NativeMng.dll_class_NativeFCMSWrapper__NativeFCMSWrapper::mNativeFCMSWrapper]
push eax
push 0xfde9
call sym.NativeMng.dll_public:_int___thiscall_NativeFCMSWrapper::XMF_File_Delete_unsigned_int__char_const__
mov edx, dword [esp + 0x14]
push edx
mov ecx, ebx
call fcn.1002e7c0
cmp dword [eax + 0x18], 0x10
jb 0x10031a9a
mov eax, dword [eax + 4]
jmp 0x10031a9d
add eax, 4
cmp dword [esp + 0x48], 0x10
mov ecx, dword [esp + 0x34]
jae 0x10031aac
lea ecx, [esp + 0x34]
push eax
push ecx
mov ecx, dword [sym.NativeMng.dll_class_NativeFCMSWrapper__NativeFCMSWrapper::mNativeFCMSWrapper]
push 0xfde9
call sym.NativeMng.dll_public:_int___thiscall_NativeFCMSWrapper::XMF_File_Rename_unsigned_int__char_const___char_const__
test dword [esi + 0x40], 0x80000
jne 0x10031ad3
mov ecx, dword [esp + 0x18]
push 2
call dword [sym.imp.xwmfUI.dll_public:_int___thiscall_XFClientUI::setProgressStatus_unsigned_long_int_]
push edi
call dword [sym.imp.XecureMacuxCSM.dll_public:_static_void___cdecl_XWClientSM::free_void__]
add esp, 4
xor edi, edi
jmp 0x10031b6c
cmp dword [esp + 0x14], 0
mov edi, 2
mov dword [esp + 0x24], 1
jle 0x10031b0c
mov ecx, dword [sym.NativeMng.dll_class_NativeFCMSWrapper__NativeFCMSWrapper::mNativeFCMSWrapper]
push 0x100466ec
add ecx, 4
call dword [0x1004612c]
cmp dword [esp + 0x48], 0x10
mov eax, dword [esp + 0x34]
jae 0x10031b1b
lea eax, [esp + 0x34]
mov ecx, dword [sym.NativeMng.dll_class_NativeFCMSWrapper__NativeFCMSWrapper::mNativeFCMSWrapper]
push eax
push 0xfde9
call sym.NativeMng.dll_public:_int___thiscall_NativeFCMSWrapper::XMF_File_Delete_unsigned_int__char_const__
mov eax, dword [esi + 0x40]
test eax, 0x80000
jne 0x10031b61
test eax, 0x800000
mov ecx, dword [esp + 0x18]
push 3
je 0x10031b4e
call dword [sym.imp.xwmfUI.dll_public:_int___thiscall_XFClientUI::setProgressStatus_unsigned_long_int_]
cmp eax, 0xffffffff
jmp 0x10031b66
test eax, 0x400000
je 0x10031c1a
call dword [sym.imp.xwmfUI.dll_public:_int___thiscall_XFClientUI::setProgressStatus_unsigned_long_int_]
jmp 0x10031b6c
test eax, 0x400000
je 0x10031c88
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.XecureMacuxCSM.dll_public:_static_void___cdecl_XWClientSM::free_void__]
add esp, 4
test ebp, ebp
mov dword [esp + 0x1c], 0
je 0x10031bb0
mov eax, ebp
lea edx, [eax + 1]
jmp 0x10031b90
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x10031b90
sub eax, edx
push eax
push 0
push ebp
call sub.MSVCR80.dll_memset
push ebp
call dword [sym.imp.MSVCR80.dll_free]
add esp, 0x10
xor ebp, ebp
mov eax, dword [esp + 0x14]
add dword [esp + 0x20], 0x1c
add eax, 1
cmp eax, dword [esi + 0x38]
mov dword [esp + 0x14], eax
jb 0x100317d0
jmp 0x10031c88
push edi
call dword [sym.imp.XecureMacuxCSM.dll_public:_static_void___cdecl_XWClientSM::free_void__]
add esp, 4
cmp dword [esp + 0x14], 0
mov edi, 1
jle 0x10031bf8
mov ecx, dword [sym.NativeMng.dll_class_NativeFCMSWrapper__NativeFCMSWrapper::mNativeFCMSWrapper]
push 0x100466ec
add ecx, 4
call dword [0x1004612c]
cmp dword [esp + 0x48], 0x10
mov eax, dword [esp + 0x34]
jae 0x10031c07
lea eax, [esp + 0x34]
mov ecx, dword [sym.NativeMng.dll_class_NativeFCMSWrapper__NativeFCMSWrapper::mNativeFCMSWrapper]
push eax
push 0xfde9
call sym.NativeMng.dll_public:_int___thiscall_NativeFCMSWrapper::XMF_File_Delete_unsigned_int__char_const__
jmp 0x10031c88
call dword [sym.imp.xwmfUI.dll_public:_int___thiscall_XFClientUI::setProgressStatus_unsigned_long_int_]
jmp 0x10031c88
test dword [esi + 0x40], 0x80000
jne 0x10031c37
mov ecx, dword [esp + 0x18]
push 3
call dword [sym.imp.xwmfUI.dll_public:_int___thiscall_XFClientUI::setProgressStatus_unsigned_long_int_]
cmp dword [esp + 0x14], 0
mov edi, 2
mov dword [esp + 0x24], 1
jle 0x10031c5f
mov ecx, dword [sym.NativeMng.dll_class_NativeFCMSWrapper__NativeFCMSWrapper::mNativeFCMSWrapper]
push 0x100466ec
add ecx, 4
call dword [0x1004612c]
test ebp, ebp
je 0x10031c88
mov eax, ebp
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x10031c68
sub eax, edx
push eax
push 0
push ebp
call sub.MSVCR80.dll_memset
push ebp
call dword [sym.imp.MSVCR80.dll_free]
add esp, 0x10
xor ebp, ebp
mov ecx, dword [sym.NativeMng.dll_class_NativeFCMSWrapper__NativeFCMSWrapper::mNativeFCMSWrapper]
mov dword [ecx], edi
mov edi, dword [esp + 0x14]
cmp edi, dword [esi + 0x38]
jae 0x10031cc0
lea esp, [esp]
test edi, edi
jle 0x10031cb8
mov ecx, dword [sym.NativeMng.dll_class_NativeFCMSWrapper__NativeFCMSWrapper::mNativeFCMSWrapper]
push 0x100466ec
add ecx, 4
call dword [0x1004612c]
add edi, 1
cmp edi, dword [esi + 0x38]
jb 0x10031ca0
mov esi, dword [esi + 0x40]
test esi, 0x200000
jne 0x10031cda
cmp dword [esp + 0x24], 0
jne 0x10031cec
test esi, 0x100000
je 0x10031cec
test esi, 0x80000
jne 0x10031cec
mov ecx, dword [esp + 0x18]
call dword [sym.imp.xwmfUI.dll_public:_void___thiscall_XFClientUI::endProgress_void_]
call dword [sym.imp.XecureMacuxCSM.dll_public:_static_void___cdecl_XWClientSM::removeInstance_void_]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x10031d04
push eax
call dword [sym.imp.XecureMacuxCSM.dll_public:_static_void___cdecl_XWClientSM::free_void__]
add esp, 4
test ebp, ebp
je 0x10031d2e
mov eax, ebp
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x10031d10
sub eax, edx
push eax
push 0
push ebp
call sub.MSVCR80.dll_memset
push ebp
call dword [sym.imp.MSVCR80.dll_free]
add esp, 0x10
push str.DownloadFileThread_End_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea ecx, [esp + 0x30]
mov dword [esp + 0x58], 0xffffffff
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
xor eax, eax
mov ecx, dword [esp + 0x50]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x38]
xor ecx, esp
call fcn.10041218
add esp, 0x48
ret 4