joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4063f0
Capabilities:
Access peb ldr_data
Check internet connectivity via wininet
Download url
Read .ini file
Receive data

Disassembly:
push 0xffffffffffffffff
push 0x410b90
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1c
push esi
mov esi, ecx
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
mov dword [esp + 0x28], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0xc]
mov byte [esp + 0x28], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 8]
mov byte [esp + 0x28], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 4]
mov byte [esp + 0x28], 3
call sub.MFC42.DLL_CString::CString
lea eax, [esp + 0xc]
mov ecx, esi
push eax
push 0
mov byte [esp + 0x30], 4
call fcn.00405ed0
mov ecx, dword [esp + 0xc]
push ecx
push 0x104
push 0x104
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::GetBuffer
push eax
push 0x417dd0
push str.webpath
push str.DOWNLOADINI
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push 0xffffffffffffffff
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::ReleaseBuffer
push str.DownSvrListNew.ini
lea ecx, [esp + 8]
call fcn.0040f84a
lea edx, [esp + 4]
lea eax, [esp + 8]
push edx
lea ecx, [esp + 0x1c]
push eax
push ecx
call sub.MFC42.DLL_operator_1
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x2c], 5
call fcn.0040f8b0
lea ecx, [esp + 0x18]
mov byte [esp + 0x28], 4
call fcn.0040f790
mov edx, dword [esp + 4]
mov eax, dword [esi + 0x858]
push edx
push eax
lea ecx, [esp + 0x18]
push str._sDownLoad_s
push ecx
call sub.MFC42.DLL_CString::Format
add esp, 0x10
lea edx, [esp + 0x1c]
push 0
push edx
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
test eax, eax
jne 0x406564
lea ecx, [esp + 4]
mov byte [esp + 0x28], 3
call fcn.0040f790
lea ecx, [esp + 8]
mov byte [esp + 0x28], 2
call fcn.0040f790
lea ecx, [esp + 0xc]
mov byte [esp + 0x28], 1
call fcn.0040f790
lea ecx, [esp + 0x10]
mov byte [esp + 0x28], 0
call fcn.0040f790
lea ecx, [esp + 0x14]
mov dword [esp + 0x28], 0xffffffff
call fcn.0040f790
xor eax, eax
pop esi
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
add esp, 0x28
ret
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
push 0
push 0
push eax
push ecx
push 0
call sub.urlmon.dll_URLDownloadToFileA
xor edx, edx
lea ecx, [esp + 4]
test eax, eax
sete dl
mov esi, edx
mov byte [esp + 0x28], 3
call fcn.0040f790
lea ecx, [esp + 8]
mov byte [esp + 0x28], 2
call fcn.0040f790
lea ecx, [esp + 0xc]
mov byte [esp + 0x28], 1
call fcn.0040f790
lea ecx, [esp + 0x10]
mov byte [esp + 0x28], 0
call fcn.0040f790
lea ecx, [esp + 0x14]
mov dword [esp + 0x28], 0xffffffff
call fcn.0040f790
mov ecx, dword [esp + 0x20]
mov eax, esi
pop esi
mov dword fs:[0], ecx
add esp, 0x28
ret
Function at 0x4069c0
Capabilities:
Read .ini file

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x410beb
push eax
mov dword fs:[0], esp
sub esp, 0x88
push ebx
push ebp
mov ebp, ecx
xor ebx, ebx
push esi
push edi
mov eax, dword [ebp + 0x138]
cmp eax, ebx
jne 0x406b26
mov ecx, 0x1f
xor eax, eax
lea edi, [esp + 0x19]
mov byte [esp + 0x18], bl
rep stosd dword es:[edi], eax
mov cl, byte [0x417dc8]
stosw word es:[edi], ax
stosb byte es:[edi], al
mov al, 1
test al, cl
jne 0x406a32
mov dl, cl
mov ecx, 0x417dc4
or dl, al
mov byte [0x417dc8], dl
call sub.MFC42.DLL_CString::CString
push 0x406b50
call fcn.0040fad4
add esp, 4
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov eax, dword [0x417dc4]
mov dword [esp + 0x14], ebx
or edi, 0xffffffff
cmp dword [eax - 8], ebx
jne 0x406af1
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
lea eax, [esp + 0x10]
mov ecx, ebp
push eax
push ebx
mov dword [esp + 0xa8], ebx
call fcn.00405ed0
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x18]
push ecx
push 0x80
push edx
push 0x417dd0
push str.name
push str.lobby
call esi
lea eax, [esp + 0x18]
mov ecx, 0x417dc4
push eax
call fcn.0040f84a
push 0x4169d4
mov ecx, 0x417dc4
call sub.MFC42.DLL_CString::operator
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x18]
push ecx
push 0x80
push edx
push 0x417dd0
push str.version
push str.lobby
call esi
lea eax, [esp + 0x18]
mov ecx, 0x417dc4
push eax
call sub.MFC42.DLL_CString::operator
lea ecx, [esp + 0x10]
mov dword [esp + 0xa0], edi
call fcn.0040f790
mov eax, dword [0x417dc4]
cmp dword [eax - 8], ebx
je 0x406b12
push eax
push ebx
call dword [sym.imp.USER32.dll_FindWindowA]
push eax
call sub.MFC42.DLL_CWnd::FromHandle
cmp eax, ebx
jne 0x406b3f
mov ecx, 0x417dc4
call sub.MFC42.DLL_CString::Empty
mov eax, dword [0x417dc4]
mov ecx, dword [esp + 0x14]
inc ecx
cmp ecx, 2
mov dword [esp + 0x14], ecx
jl 0x406a44
xor eax, eax
mov ecx, dword [esp + 0x98]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x94
ret
mov eax, dword [eax + 0x20]
jmp 0x406b26
Function at 0x407210
Capabilities:
Read .ini file

Disassembly:
push 0xffffffffffffffff
push 0x410d0c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x264
push ebx
push esi
mov esi, ecx
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::CString
xor ebx, ebx
lea ecx, [esp + 0x10]
mov dword [esp + 0x274], ebx
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 8]
mov byte [esp + 0x274], 1
call sub.MFC42.DLL_CString::CString
lea eax, [esp + 0x10]
mov ecx, esi
push eax
push ebx
mov byte [esp + 0x27c], 2
call fcn.00405ed0
mov ecx, dword [esp + 0x10]
push ecx
push 0x104
push 0x104
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::GetBuffer
push eax
push 0x417dd0
push str.webpath
push str.DOWNLOADINI
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push 0xffffffffffffffff
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::ReleaseBuffer
mov edx, dword [esp + 8]
cmp dword [edx - 8], ebx
je 0x4072e5
mov eax, dword [esp + 0x27c]
cmp eax, ebx
jge 0x407333
cmp eax, 0xffffff9c
jne 0x4072e5
mov edx, dword [esp + 8]
lea eax, [esp + 0xc]
push edx
push str._sVersionInfo_default.htm
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0xc
mov ecx, dword [esp + 0xc]
push ecx
mov ecx, esi
call fcn.004071c0
lea ecx, [esp + 8]
mov byte [esp + 0x274], 1
call fcn.0040f790
lea ecx, [esp + 0x10]
mov byte [esp + 0x274], bl
call fcn.0040f790
lea ecx, [esp + 0xc]
mov dword [esp + 0x274], 0xffffffff
call fcn.0040f790
mov ecx, dword [esp + 0x26c]
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x270
ret 4
cmp eax, 0xffffff9c
je 0x4072c2
lea ecx, [esp + 0x18]
push ecx
push eax
mov ecx, esi
call fcn.004051f0
test eax, eax
je 0x4072c2
mov edx, dword [esp + 0x244]
lea eax, [esp + 0x14]
push edx
push eax
mov ecx, esi
call fcn.004058a0
mov ecx, dword [eax]
mov eax, dword [esp + 8]
lea edx, [esp + 0x24c]
push ecx
push edx
push eax
lea ecx, [esp + 0x18]
push str._sVersionInfo__s_V_s.htm
push ecx
mov byte [esp + 0x288], 3
call sub.MFC42.DLL_CString::Format
add esp, 0x14
lea ecx, [esp + 0x14]
mov byte [esp + 0x274], 2
call fcn.0040f790
jmp 0x4072d9
Function at 0x407430
Capabilities:
Read .ini file

Disassembly:
push 0xffffffffffffffff
push 0x410d30
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push esi
mov esi, ecx
push edi
lea ecx, [esp + 8]
call sub.MFC42.DLL_CString::CString
lea eax, [esi + 0x858]
push str.download.ini
lea ecx, [esp + 0x10]
push eax
push ecx
mov dword [esp + 0x24], 0
call sub.MFC42.DLL_operator
push eax
lea ecx, [esp + 0xc]
mov byte [esp + 0x1c], 1
call fcn.0040f8b0
lea ecx, [esp + 0xc]
mov byte [esp + 0x18], 0
call fcn.0040f790
mov edx, dword [esp + 8]
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
push edx
push 2
push str.nThreadCnt
push str.setting
call edi
mov dword [esi + 0x11c], eax
mov eax, dword [esp + 8]
push eax
push 2
push str.nRunTaskCnt
push str.setting
call edi
lea ecx, [esp + 8]
mov dword [esi + 0x120], eax
push ecx
push 0
mov ecx, esi
call fcn.00405ed0
mov edx, dword [esp + 8]
push edx
push 0
push str.testVer
push str.LOBBY
call edi
mov dword [esi + 0x134], eax
mov eax, dword [esp + 8]
push eax
push 0
push str.customVer
push str.LOBBY
call edi
lea ecx, [esp + 8]
mov byte [esi + 0x20c], al
mov dword [esp + 0x18], 0xffffffff
call fcn.0040f790
mov ecx, dword [esp + 0x10]
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x14
ret
Function at 0x407df0
Capabilities:
Check for peb beingdebugged flag

Disassembly:
push 0xffffffffffffffff
push 0x410e50
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc
push ebx
push ebp
push esi
add ecx, 0x23c
push edi
push ecx
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString_2
push 0x28
lea ecx, [esp + 0x14]
mov dword [esp + 0x28], 0
call sub.MFC42.DLL_CString::ReverseFind
mov edx, dword [esp + 0x10]
mov esi, dword [esp + 0x30]
mov ebx, eax
xor ecx, ecx
mov edi, dword [edx - 8]
cmp ebx, edi
jge 0x407e6a
lea eax, [ebx + 1]
cmp byte [edx + eax - 1], 0x2c
jne 0x407e62
inc ecx
cmp ecx, 4
jne 0x407e56
mov esi, eax
jmp 0x407e62
cmp ecx, 5
jne 0x407e62
lea ebp, [eax - 2]
mov dword [esp + 0x14], ebp
inc eax
lea ebp, [eax - 1]
cmp ebp, edi
jl 0x407e45
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x18]
sub eax, esi
inc eax
push eax
push esi
push ecx
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::Mid_1
mov eax, dword [eax]
mov ebp, dword [sym.imp.MSVCRT.dll_atoi]
push eax
call ebp
add esp, 4
lea ecx, [esp + 0x18]
mov edi, eax
call fcn.0040f790
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x18]
add edx, 2
lea ecx, [esp + 0x10]
push edx
push eax
call sub.MFC42.DLL_CString::Mid
mov eax, dword [eax]
push eax
call ebp
add esp, 4
lea ecx, [esp + 0x18]
mov ebp, eax
call fcn.0040f790
mov ecx, dword [esp + 0x30]
sub esi, ebx
shl edi, 8
add edi, ebp
sub esi, 2
inc ebx
push esi
lea edx, [esp + 0x34]
mov dword [ecx], edi
push ebx
push edx
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::Mid_1
mov esi, dword [esp + 0x2c]
push eax
mov ecx, esi
mov byte [esp + 0x28], 1
call fcn.0040f8b0
lea ecx, [esp + 0x30]
mov byte [esp + 0x24], 0
call fcn.0040f790
push 0x416afc
push 0x416294
mov ecx, esi
call sub.MFC42.DLL_CString::Replace
lea ecx, [esp + 0x10]
mov dword [esp + 0x24], 0xffffffff
call fcn.0040f790
mov ecx, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x18
ret 8
Function at 0x408190
Capabilities:
Access peb ldr_data
Get process heap flags
Get process heap force flags

Disassembly:
push 0xffffffffffffffff
push 0x410ef4
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebx
push esi
mov esi, ecx
push edi
mov dword [esp + 0xc], esi
lea ecx, [esi + 0x2fc]
call sub.MFC42.DLL_CString::CString
xor ebx, ebx
lea ecx, [esi + 0x314]
mov dword [esp + 0x18], ebx
call sub.MFC42.DLL_CString::CString
lea ecx, [esi + 0x318]
mov byte [esp + 0x18], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esi + 0x31c]
mov byte [esp + 0x18], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [esi + 0x320]
mov byte [esp + 0x18], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [esi + 0x324]
mov byte [esp + 0x18], 4
call sub.MFC42.DLL_CString::CString
lea edi, [esi + 0x32c]
push ebx
mov ecx, edi
mov byte [esp + 0x1c], 5
call sub.MFC42.DLL_CSyncObject::CSyncObject
mov dword [edi], 0x412978
add edi, 8
push edi
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea ecx, [esi + 0x374]
mov dword [esi + 0x34c], 0x412e4c
mov dword [esi + 0x358], ebx
mov dword [esi + 0x35c], ebx
mov dword [esi + 0x354], ebx
mov dword [esi + 0x350], ebx
mov dword [esi + 0x360], ebx
mov dword [esi + 0x364], 0xa
xor eax, eax
mov dword [esi], 0x412e40
mov dword [esi + 0x368], ebx
mov dword [esi + 0x36c], ebx
mov dword [esi + 0x370], ebx
mov dword [ecx], eax
lea edx, [esi + 0x44]
mov dword [ecx + 4], eax
mov edi, edx
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], eax
mov ecx, 0x86
mov byte [esi + 0x384], bl
mov dword [esi + 0x310], ebx
mov dword [esi + 0x328], ebx
rep stosd dword es:[edi], eax
lea ecx, [esi + 0x300]
lea edi, [esi + 0x25c]
mov dword [ecx], eax
mov dword [ecx + 4], eax
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], eax
mov ecx, 0x18
rep stosd dword es:[edi], eax
mov ecx, 0x10
lea edi, [esi + 0x2bc]
rep stosd dword es:[edi], eax
mov ecx, 8
lea edi, [esi + 0xc]
rep stosd dword es:[edi], eax
mov dword [esi + 0x2c], ebx
mov dword [esi + 0x30], ebx
mov dword [esi + 0x38], ebx
mov dword [esi + 0x34], ebx
mov dword [esi + 0x3c], ebx
mov ecx, dword [esp + 0x10]
mov dword [esi + 0x40], ebx
mov byte [esi + 0x385], bl
mov byte [esi + 0x386], bl
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov byte [esi + 0x387], bl
mov byte [esi + 0x388], bl
mov byte [esi + 0x389], bl
mov eax, esi
pop edi
mov dword [edx], 1
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x10
ret

Function at 0x4084a0
Capabilities:
Create thread

Disassembly:
push esi
push 0
push 0
push 1
push 0
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_CreateEventA]
push 0
push 0
push esi
push 0x408870
push 0
push 0
mov dword [esi + 0x38], eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 0x2c], eax
mov eax, 1
pop esi
ret
Function at 0x4085f0
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x410fa6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x338
push ebx
push ebp
push esi
mov esi, ecx
push edi
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
lea eax, [esp + 0x10]
xor ebx, ebx
push eax
mov ecx, esi
mov dword [esp + 0x354], ebx
call fcn.00409b90
mov ecx, dword [esp + 0x10]
push 0x416bd8
push ecx
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebp, eax
add esp, 8
cmp ebp, ebx
je 0x408839
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString
lea edx, [esp + 0x14]
push ebx
push edx
mov ecx, esi
mov byte [esp + 0x358], 1
call fcn.00409b60
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x230]
push eax
push ecx
call sub.MFC42.DLL_CFile::GetStatus
push ebp
push 0x218
lea edx, [esp + 0x20]
push 1
push edx
call dword [sym.imp.MSVCRT.dll_fread]
mov edx, dword [esp + 0x28]
add esp, 0x10
cmp edx, 1
jl 0x408814
cmp edx, 8
jg 0x408814
lea edi, [esp + 0x120]
lea eax, [esi + 0x14c]
mov bl, byte [eax]
mov cl, bl
cmp bl, byte [edi]
jne 0x4086d9
test cl, cl
je 0x4086d5
mov bl, byte [eax + 1]
mov cl, bl
cmp bl, byte [edi + 1]
jne 0x4086d9
add eax, 2
add edi, 2
test cl, cl
jne 0x4086b5
xor eax, eax
jmp 0x4086de
sbb eax, eax
sbb eax, 0xffffffff
xor ebx, ebx
cmp eax, ebx
jne 0x408814
lea edi, [esp + 0x1c]
lea eax, [esi + 0x48]
mov bl, byte [eax]
mov cl, bl
cmp bl, byte [edi]
jne 0x408713
test cl, cl
je 0x40870f
mov bl, byte [eax + 1]
mov cl, bl
cmp bl, byte [edi + 1]
jne 0x408713
add eax, 2
add edi, 2
test cl, cl
jne 0x4086ef
xor eax, eax
jmp 0x408718
sbb eax, eax
sbb eax, 0xffffffff
xor ebx, ebx
cmp eax, ebx
jne 0x408814
mov eax, dword [esp + 0x228]
mov ecx, dword [esi + 0x254]
cmp eax, ecx
jne 0x408814
mov ecx, dword [esp + 0x22c]
mov eax, dword [esp + 0x234]
cmp ecx, eax
jne 0x408814
mov edi, dword [esp + 0x358]
cmp edi, ebx
jne 0x408773
mov eax, dword [esp + 0x224]
mov ecx, dword [esi + 0x250]
cmp eax, ecx
je 0x408773
push 0x416bac
jmp 0x408819
lea ecx, [edx + edx*2]
push ebp
shl ecx, 2
push ecx
lea edx, [esi + 0x25c]
push 1
push edx
call dword [sym.imp.MSVCRT.dll_fread]
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
mov edx, dword [esp + 0x2c]
add esp, 0x14
xor ecx, ecx
cmp edx, ebx
mov dword [esi + 0x368], ebx
jle 0x4087be
lea eax, [esi + 0x260]
mov ebp, dword [eax + 4]
add eax, 0xc
add ecx, ebp
mov ebp, dword [eax - 0xc]
add dword [esi + 0x368], ebp
dec edx
jne 0x4087aa
cmp ecx, dword [esp + 0x224]
je 0x4087d7
push 0x416b78
push ebx
call fcn.00409b00
add esp, 8
jmp 0x408829
cmp edi, ebx
jne 0x4087e9
lea edi, [esi + 0x44]
mov ecx, 0x86
lea esi, [esp + 0x18]
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x14]
mov byte [esp + 0x350], bl
call fcn.0040f790
lea ecx, [esp + 0x10]
mov dword [esp + 0x350], 0xffffffff
call fcn.0040f790
mov eax, 1
jmp 0x40884f
push 0x416b58
push ebx
call fcn.00409b00
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0xc
lea ecx, [esp + 0x14]
mov byte [esp + 0x350], bl
call fcn.0040f790
lea ecx, [esp + 0x10]
mov dword [esp + 0x350], 0xffffffff
call fcn.0040f790
xor eax, eax
mov ecx, dword [esp + 0x348]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x344
ret 4
Function at 0x409aa0
Capabilities:
Check if file exists
Create thread

Disassembly:
push esi
mov esi, ecx
push edi
lea edi, [esi + 0x14c]
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
mov ecx, esi
jne 0x409ad3
push 0xd
call fcn.00409700
push edi
push 0x416df4
push 0
call fcn.00409b00
add esp, 0xc
xor eax, eax
pop edi
pop esi
ret
push 5
call fcn.00409700
push 0
push 0
push esi
push 0x4091e0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 0x30], eax
pop edi
mov eax, 1
pop esi
ret
Function at 0x409bc0
Capabilities:
Check if file exists
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x411118
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x414
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 0x10], esp
test eax, eax
mov dword [ebp - 0x1c], esi
jne 0x409bf6
lea eax, [esi + 0x14c]
push eax
lea ecx, [ebp + 8]
call sub.MFC42.DLL_CString::CString_2
mov ecx, esi
mov dword [ebp - 4], 0
call fcn.004097c0
test eax, eax
jne 0x409c48
mov eax, dword [ebp + 8]
push eax
push str.ERR
push 0
call fcn.00409b00
add esp, 0xc
lea ecx, [ebp + 8]
mov dword [ebp - 4], 0xffffffff
call fcn.0040f790
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea ecx, [ebp - 0x20]
call sub.MFC42.DLL_CString::CString
mov ebx, 1
lea ecx, [ebp - 0x20]
push 0
mov edi, ebx
push ecx
mov ecx, esi
mov byte [ebp - 4], bl
mov dword [ebp - 0x14], edi
call fcn.00409b60
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x409c82
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, esi
call fcn.0040a400
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x20]
push ecx
push edx
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CFile::Rename
jmp 0x409cff
lea ecx, [ebp - 0x1c]
mov dword [ebp - 4], ebx
call fcn.0040c0b0
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 5
call sub.MFC42.DLL_CString::CString
mov edx, dword [esi + 0x324]
mov byte [ebp - 4], 6
mov eax, dword [edx - 8]
test eax, eax
je 0x409d94
mov edx, dword [ebp + 8]
lea eax, [ebp - 0x14]
lea ecx, [ebp - 0x18]
push eax
push ecx
push edx
lea ecx, [ebp - 0x1c]
call fcn.0040c0c0
test eax, eax
jne 0x409d5d
mov eax, dword [ebp - 0x14]
push eax
push 0x416e6c
push ebx
call fcn.00409b00
add esp, 0xc
mov eax, dword [esi + 0x324]
mov ecx, dword [ebp - 0x18]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll__mbsicmp]
add esp, 8
test eax, eax
je 0x409d94
mov edx, dword [esi + 0x324]
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp + 8]
push edx
push eax
push ecx
push 0x416e44
push ebx
xor edi, edi
call fcn.00409b00
add esp, 0x14
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 5
call fcn.0040f790
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 4
call fcn.0040f790
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], bl
call fcn.0040c340
test edi, edi
jne 0x409dd2
mov cl, byte [esi + 0x387]
push 0xc
inc cl
mov byte [esi + 0x387], cl
mov ecx, esi
call fcn.00409700
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 0
call fcn.0040f790
lea ecx, [ebp + 8]
mov dword [ebp - 4], 0xffffffff
call fcn.0040f790
mov ecx, dword [ebp - 0xc]
mov eax, edi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x409e10
Capabilities:
Check if file exists

Disassembly:
push 0xffffffffffffffff
push 0x411140
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push ebp
push esi
mov esi, ecx
push edi
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0xc]
mov dword [esp + 0x1c], 0
call sub.MFC42.DLL_CString::CString
lea eax, [esp + 0xc]
mov ecx, esi
push eax
mov byte [esp + 0x20], 1
call fcn.00409b90
mov ecx, dword [esp + 0xc]
mov ebp, dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
push ecx
call ebp
test eax, eax
je 0x409e73
mov edx, dword [esp + 0xc]
push edx
call sub.MFC42.DLL_CFile::Remove
mov eax, dword [esi + 0x44]
xor edi, edi
test eax, eax
jle 0x409ea6
lea eax, [esp + 0x10]
push edi
push eax
mov ecx, esi
call fcn.00409b60
mov ecx, dword [esp + 0x10]
push ecx
call ebp
test eax, eax
je 0x409e9e
mov edx, dword [esp + 0x10]
push edx
call sub.MFC42.DLL_CFile::Remove
mov eax, dword [esi + 0x44]
inc edi
cmp edi, eax
jl 0x409e7c
lea ecx, [esp + 0xc]
mov byte [esp + 0x1c], 0
call fcn.0040f790
lea ecx, [esp + 0x10]
mov dword [esp + 0x1c], 0xffffffff
call fcn.0040f790
mov ecx, dword [esp + 0x14]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x14
ret
Function at 0x409ee0
Capabilities:
Access peb ldr_data
Print debug messages

Disassembly:
push 0xffffffffffffffff
push 0x411158
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
mov edx, dword [esp + 0x24]
xor eax, eax
mov dword [esp + 4], eax
push ebx
mov ebx, dword [esp + 0x2c]
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x24]
push ebp
push esi
mov ebp, ecx
mov cl, byte [esp + 0x3c]
push edi
add eax, edx
push ebx
mov byte [esp + 0x14], cl
mov dword [esp + 0x1c], eax
call sub.MFC42.DLL_operatornew
mov esi, dword [esp + 0x40]
mov ecx, ebx
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
add esp, 4
mov dword [esp + 0x30], eax
and ecx, 3
lea eax, [ebp + 0x334]
rep movsb byte es:[edi], byte [esi]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp + 0x35c]
mov esi, dword [ebp + 0x354]
test eax, eax
jne 0x409fa2
mov ecx, dword [ebp + 0x364]
push 0x18
lea edx, [ebp + 0x360]
push ecx
push edx
call sub.MFC42.DLL_CPlex::Create
mov ecx, dword [ebp + 0x364]
lea edx, [ecx + ecx*2]
dec ecx
test ecx, ecx
lea eax, [eax + edx*8 - 0x14]
jl 0x409fa2
inc ecx
mov edx, dword [ebp + 0x35c]
mov dword [eax], edx
mov dword [ebp + 0x35c], eax
sub eax, 0x18
dec ecx
jne 0x409f8e
mov eax, dword [ebp + 0x35c]
xor edx, edx
mov ecx, dword [eax]
mov dword [ebp + 0x35c], ecx
mov dword [eax + 4], esi
mov dword [eax], 0
mov esi, dword [ebp + 0x358]
inc esi
lea ecx, [eax + 8]
mov dword [ebp + 0x358], esi
mov esi, ecx
mov dword [esi], edx
mov dword [esi + 4], edx
mov dword [esi + 8], edx
mov dword [esi + 0xc], edx
mov edx, dword [esp + 0x10]
mov esi, dword [esp + 0x18]
mov dword [ecx], edx
mov edx, dword [esp + 0x30]
mov dword [ecx + 4], edx
mov dword [ecx + 8], esi
mov dword [ecx + 0xc], ebx
mov ecx, dword [ebp + 0x354]
test ecx, ecx
je 0x409ffd
mov dword [ecx], eax
jmp 0x40a003
mov dword [ebp + 0x350], eax
lea ecx, [esp + 0x34]
mov dword [ebp + 0x354], eax
call sub.MFC42.DLL_CString::CString
mov eax, dword [esp + 0x40]
push ebx
push esi
lea ecx, [ebp + 0x14c]
push eax
push ecx
lea edx, [esp + 0x44]
push str._s_Inx:_d_Offset:_d_Len:_d_r_n
push edx
mov dword [esp + 0x40], 0
call sub.MFC42.DLL_CString::Format
mov eax, dword [esp + 0x4c]
add esp, 0x18
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov edx, dword [ebp + 0x32c]
lea ecx, [ebp + 0x32c]
call dword [edx + 0x1c]
mov eax, dword [ebp + 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
lea ecx, [esp + 0x34]
mov dword [esp + 0x28], 0xffffffff
call fcn.0040f790
mov ecx, dword [esp + 0x20]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x1c
ret 0x14