Function at 0x4209b0
Capabilities:
Check if file exists
Check mutex on windows
Print debug messages
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x48bc4e
mov eax, dword fs:[0]
push eax
sub esp, 0x250
mov eax, dword [0x4c6018]
xor eax, esp
mov dword [esp + 0x248], eax
push ebx
push esi
push edi
mov eax, dword [0x4c6018]
xor eax, esp
push eax
lea eax, [esp + 0x260]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
push 0x104
push 0x4d48f8
xor ebx, ebx
push ebx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], ecx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x5c
push 0x4d48f8
call dword [sym.imp.MSVCR100.dll_strrchr]
push 0x4d48f8
lea edx, [esp + 0x158]
push 0x104
push edx
mov byte [eax + 1], bl
call dword [sym.imp.MSVCR100.dll_strcpy_s]
add esp, 0x14
push str.downloadCert.txt
lea eax, [esp + 0x150]
push 0x104
push eax
call dword [sym.imp.MSVCR100.dll_strcat_s]
add esp, 0xc
lea edi, [ebx + 7]
mov eax, str.ABChina
lea esi, [esp + 0x3c]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x50], 0xf
mov dword [esp + 0x4c], ebx
mov byte [esp + 0x3c], bl
call fcn.00402610
push 0xc
mov eax, str.LogFileMutex
mov ecx, esi
mov dword [esp + 0x26c], ebx
call fcn.00409fe0
xor esi, esi
mov ecx, esi
inc esi
cmp ecx, 5
jg 0x420d43
cmp dword [esp + 0x50], 0x10
mov eax, dword [esp + 0x3c]
jae 0x420aab
lea eax, [esp + 0x3c]
push eax
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov edi, eax
mov dword [esp + 0x38], edi
cmp edi, ebx
jne 0x420ad8
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x420ad8
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x420a90
lea eax, [esp + 0x14c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
push 0x4bc2c4
lea ecx, [esp + 0x150]
push ecx
lea edx, [esp + 0x1c]
push edx
call dword [sym.imp.MSVCR100.dll_fopen_s]
add esp, 0xc
cmp dword [esp + 0x14], ebx
je 0x420d31
lea ecx, [esp + 0x20]
call dword [sym.imp.mfc100.dll_Ordinal_316]
push ebx
mov byte [esp + 0x26c], 1
call dword [sym.imp.MSVCR100.dll__time64]
mov esi, dword [sym.imp.MSVCR100.dll__localtime64_s]
mov dword [esp + 0x1c], eax
add esp, 4
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0xe4]
push ecx
mov dword [esp + 0x24], edx
call esi
add esp, 8
or edi, 0xffffffff
cmp eax, ebx
jne 0x420b5b
mov edx, dword [esp + 0xe0]
mov dword [esp + 0x28], edx
jmp 0x420b5f
mov dword [esp + 0x28], edi
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x12c]
push ecx
call esi
add esp, 8
cmp eax, ebx
jne 0x420b82
mov edx, dword [esp + 0x12c]
mov dword [esp + 0x2c], edx
jmp 0x420b86
mov dword [esp + 0x2c], edi
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x78]
push ecx
call esi
add esp, 8
cmp eax, ebx
jne 0x420ba3
mov edx, dword [esp + 0x7c]
mov dword [esp + 0x24], edx
jmp 0x420ba7
mov dword [esp + 0x24], edi
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x9c]
push ecx
call esi
neg eax
sbb eax, eax
not eax
and eax, dword [esp + 0xac]
lea edx, [esp + 0x20]
mov ebx, eax
push edx
lea eax, [esp + 0xc8]
push eax
call esi
add esp, 0x10
test eax, eax
jne 0x420be5
mov edi, dword [esp + 0xcc]
inc edi
jmp 0x420be7
xor edi, edi
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x108]
push edx
call esi
add esp, 8
test eax, eax
jne 0x420c0b
mov eax, dword [esp + 0x118]
add eax, 0x76c
jmp 0x420c0d
xor eax, eax
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
push ecx
mov ecx, dword [esp + 0x28]
push edx
push ecx
push ebx
push edi
push eax
lea edx, [esp + 0x38]
push str._04d__02d__02d__02d:_02d:_02d_
push edx
call dword [sym.imp.mfc100.dll_Ordinal_4283]
add esp, 0x20
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x14]
call dword [sym.imp.mfc100.dll_Ordinal_300]
mov eax, dword [esp + 0x34]
mov byte [esp + 0x268], 2
lea ecx, [esp + 0x10]
test eax, eax
je 0x420c67
push eax
call dword [sym.imp.mfc100.dll_Ordinal_2138]
push 0x4bc2ec
lea ecx, [esp + 0x14]
jmp 0x420c6c
push str.MSG
call dword [sym.imp.mfc100.dll_Ordinal_2138]
mov ecx, dword [esp + 0x30]
push ecx
lea ecx, [esp + 0x14]
call dword [sym.imp.mfc100.dll_Ordinal_2138]
push 0x4bc2f8
lea ecx, [esp + 0x14]
call dword [sym.imp.mfc100.dll_Ordinal_2138]
mov edx, dword [esp + 0x10]
mov esi, dword [edx - 0xc]
push ecx
lea eax, [esp + 0x14]
mov ecx, esp
mov dword [esp + 0x34], esp
push eax
call dword [sym.imp.mfc100.dll_Ordinal_300]
lea ecx, [esp + 0x5c]
push ecx
call fcn.00420760
add esp, 8
mov byte [esp + 0x268], 3
mov eax, dword [esp + 0x58]
mov edi, 0x10
cmp dword [esp + 0x6c], edi
jae 0x420cd1
lea eax, [esp + 0x58]
mov edx, dword [esp + 0x14]
push edx
push esi
push 1
push eax
call dword [sym.imp.MSVCR100.dll_fwrite]
mov eax, dword [esp + 0x24]
push eax
call dword [sym.imp.MSVCR100.dll_fclose]
add esp, 0x14
cmp dword [esp + 0x6c], edi
jb 0x420d02
mov ecx, dword [esp + 0x58]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
lea ecx, [esp + 0x10]
mov dword [esp + 0x6c], 0xf
mov dword [esp + 0x68], 0
mov byte [esp + 0x58], 0
call dword [sym.imp.mfc100.dll_Ordinal_901]
lea ecx, [esp + 0x20]
call dword [sym.imp.mfc100.dll_Ordinal_901]
mov edi, dword [esp + 0x38]
jmp 0x420d3c
push 0x4bc2fc
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x50], 0x10
jb 0x420d58
mov edx, dword [esp + 0x3c]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov ecx, dword [esp + 0x260]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x248]
xor ecx, esp
call fcn.00449013
mov esp, ebp
pop ebp
ret