Function at 0x10031d70
Capabilities:
Print debug messages

Disassembly:
push 0xffffffffffffffff
push 0x10043ce9
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.DownloadFileThreadEx_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 0x100322c0
mov dword [esp + 0x20], edi
test dword [esi + 0x40], 0x80000
jne 0x10031e18
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 0x10031e20
sub eax, edx
mov edi, eax
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x10031e52
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 0x10031e58
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 0x10031ea2
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 0x10031ea8
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov eax, dword [esi + 0x1c]
add eax, ebx
cmp dword [eax + 0x18], 0x10
jb 0x10031eb8
mov eax, dword [eax + 4]
jmp 0x10031ebb
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 + 0x48]
mov ecx, dword [esi + 8]
mov edx, dword [esi + 4]
add esp, 0x14
push eax
mov eax, dword [esi]
push 0x1004e674
push ebp
push ecx
mov ecx, dword [esp + 0x38]
push edx
push eax
call dword [sym.imp.XecureMacuxCSM.dll_public:_char____thiscall_XWClientSM::blockEnc2_unsigned_long_int__char_const___char_const___char_const___char_const___char_const__]
test eax, eax
mov dword [esp + 0x1c], eax
je 0x10032255
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x10031f00
sub eax, edx
je 0x10032255
mov eax, dword [esi + 0x2c]
test eax, eax
lea ebx, [esi + 0x28]
je 0x10031f39
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 0x10031f3f
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov ecx, dword [ebx + 4]
add ecx, dword [esp + 0x20]
push ecx
lea ecx, [esp + 0x34]
call dword [0x1004613c]
test dword [esi + 0x40], 0x20000
jne 0x10031f7a
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 0x10031f89
lea edi, [esp + 0x34]
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x10031fae
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 0x10031fb4
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 0x10031fc6
mov ecx, dword [eax + 4]
jmp 0x10031fc9
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 + 0x48]
push edx
mov edx, dword [esi + 0x44]
push edx
mov edx, dword [esi + 0x3c]
push eax
mov eax, dword [esp + 0x2c]
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 + 0x5c]
push edx
call dword [sym.imp.XecureMacuxCSM.dll_public:_char____thiscall_XWClientSM::downloadFileEx_unsigned_long_int__char_const___char_const___char_const___char_const___int__char_const___char_const___char_const___char_const___int__char_const___char_const___int____cdecl___void___char_const___long_long___int64___long_long___int64___int__]
mov edi, eax
test edi, edi
je 0x1003211c
cmp byte [edi], 0
je 0x1003211c
push 6
push str.CANCEL
push edi
call dword [sym.imp.MSVCR80.dll_strncmp]
add esp, 0xc
test eax, eax
je 0x10032201
cmp dword [esp + 0x14], 0
jle 0x1003205d
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 0x10032074
mov eax, dword [eax + 4]
jmp 0x10032077
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 0x100320f6
mov ecx, dword [esp + 0x14]
push ecx
mov ecx, ebx
call fcn.1002e7c0
cmp dword [eax + 0x18], 0x10
jb 0x100320a7
mov eax, dword [eax + 4]
jmp 0x100320aa
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 0x100320d2
mov eax, dword [eax + 4]
jmp 0x100320d5
add eax, 4
cmp dword [esp + 0x48], 0x10
mov ecx, dword [esp + 0x34]
jae 0x100320e4
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 0x1003210b
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 0x100321a4
cmp dword [esp + 0x14], 0
mov edi, 2
mov dword [esp + 0x24], 1
jle 0x10032144
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 0x10032153
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 0x10032199
test eax, 0x800000
mov ecx, dword [esp + 0x18]
push 3
je 0x10032186
call dword [sym.imp.xwmfUI.dll_public:_int___thiscall_XFClientUI::setProgressStatus_unsigned_long_int_]
cmp eax, 0xffffffff
jmp 0x1003219e
test eax, 0x400000
je 0x1003224d
call dword [sym.imp.xwmfUI.dll_public:_int___thiscall_XFClientUI::setProgressStatus_unsigned_long_int_]
jmp 0x100321a4
test eax, 0x400000
je 0x100322c0
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 0x100321e3
mov eax, ebp
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x100321c3
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 0x10031e00
jmp 0x100322c0
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 0x1003222b
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 0x1003223a
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 0x100322c0
call dword [sym.imp.xwmfUI.dll_public:_int___thiscall_XFClientUI::setProgressStatus_unsigned_long_int_]
jmp 0x100322c0
test dword [esi + 0x40], 0x80000
jne 0x1003226a
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 0x10032292
mov ecx, dword [sym.NativeMng.dll_class_NativeFCMSWrapper__NativeFCMSWrapper::mNativeFCMSWrapper]
push 0x100466ec
add ecx, 4
call dword [0x1004612c]
test ebp, ebp
je 0x100322c0
mov eax, ebp
lea edx, [eax + 1]
jmp 0x100322a0
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x100322a0
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 0x100322f1
test edi, edi
jle 0x100322e9
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 0x100322d1
mov esi, dword [esi + 0x40]
test esi, 0x200000
jne 0x1003230b
cmp dword [esp + 0x24], 0
jne 0x1003231d
test esi, 0x100000
je 0x1003231d
test esi, 0x80000
jne 0x1003231d
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 0x10032335
push eax
call dword [sym.imp.XecureMacuxCSM.dll_public:_static_void___cdecl_XWClientSM::free_void__]
add esp, 4
test ebp, ebp
je 0x1003235e
mov eax, ebp
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x10032340
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.DownloadFileThreadEx_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