joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402330
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x108
mov eax, dword [0x40d020]
xor eax, esp
mov dword [esp + 0x104], eax
push 0x103
lea eax, [esp + 5]
push 0
push eax
mov byte [esp + 0xc], 0
call sub.MSVCR80.dll_memset
add esp, 0xc
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
je 0x402395
push 0xed
lea ecx, [esp + 4]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x402395
lea edx, [esp]
push 0x5c
push edx
call dword [sym.imp.MSVCR80.dll__mbsrchr]
add esp, 8
test eax, eax
je 0x402395
mov byte [eax + 1], 0
push edi
lea edi, [esp + 4]
call fcn.00401100
mov eax, edi
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
push eax
push 0
push str.ShowVerboseInfo
push str.CMain
call edi
lea ecx, [esp + 4]
push ecx
neg eax
push 0
sbb eax, eax
push str.ShowTraceInfo
neg eax
push str.CMain
mov dword [esi], eax
call edi
lea edx, [esp + 4]
push edx
neg eax
push 0
sbb eax, eax
push str.ShowErrorInfo
neg eax
push str.CMain
mov dword [esi + 4], eax
call edi
neg eax
sbb eax, eax
neg eax
cmp dword [esi + 0x20], 0
mov dword [esi + 8], eax
pop edi
jne 0x40240b
push str.CMain
lea ecx, [esi + 0xc]
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_char_const__]
mov ecx, dword [esp + 0x104]
xor ecx, esp
call fcn.00407568
add esp, 0x108
ret
Function at 0x402450
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xe10
mov eax, dword [0x40d020]
xor eax, esp
mov dword [esp + 0xe0c], eax
push esi
push edi
push 0x3ff
lea eax, [esp + 0xa15]
push 0
push eax
mov esi, ecx
mov edi, edx
mov byte [esp + 0xa1c], 0
call sub.MSVCR80.dll_memset
add esp, 0xc
push 0x3ff
lea ecx, [esp + 0x215]
push 0
push ecx
mov byte [esp + 0x21c], 0
call sub.MSVCR80.dll_memset
add esp, 0xc
push 0x3ff
lea edx, [esp + 0x615]
push 0
push edx
mov byte [esp + 0x61c], 0
call sub.MSVCR80.dll_memset
add esp, 0xc
push 0
call dword [sym.imp.MSVCR80.dll__time64]
add esp, 4
push 0x1ff
mov dword [esp + 0xc], eax
lea eax, [esp + 0x15]
push 0
push eax
mov dword [esp + 0x18], edx
mov byte [esp + 0x1c], 0
call sub.MSVCR80.dll_memset
lea ecx, [esp + 0x14]
add esp, 0xc
push ecx
call dword [sym.imp.MSVCR80.dll__localtime64]
add esp, 4
push eax
push str._Y__m__d__H:_M:_S
lea edx, [esp + 0x18]
push 0x200
push edx
call dword [sym.imp.MSVCR80.dll_strftime]
add esp, 0x10
cmp dword [esi + 0x24], 0x10
jb 0x40252b
mov esi, dword [esi + 0x10]
jmp 0x40252e
add esi, 0x10
push edi
push esi
push str.TRACE
push str._s:_s__s_r_n
mov eax, 0x3ff
lea edi, [esp + 0xa20]
call fcn.00401050
push ebx
mov eax, edi
push eax
push 0x3fe
lea ecx, [esp + 0x22c]
push 0x3ff
push ecx
call dword [sym.imp.MSVCR80.dll__vsnprintf_s]
add esp, 0x24
test eax, eax
jl 0x402577
cmp eax, 0x3fe
ja 0x402577
jne 0x40257f
mov byte [esp + 0x60e], 0
lea edx, [esp + 0x210]
push edx
lea eax, [esp + 0x14]
push eax
push str._s__s
mov eax, 0x3ff
lea edi, [esp + 0x61c]
call fcn.00401050
add esp, 0xc
mov ecx, edi
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call fcn.004025d0
mov ecx, dword [esp + 0xe14]
pop edi
pop esi
xor ecx, esp
call fcn.00407568
mov esp, ebp
pop ebp
ret

Function at 0x4025d0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0xc
push ebx
push esi
call dword [section..data]
cmp dword [0x40d448], 0
jne 0x4025f8
call fcn.00402870
mov dword [0x40d44c], eax
mov dword [0x40d448], 1
cmp dword [0x40d44c], 0
je 0x402669
push 0
push 0x20
push 4
push 0
push 1
push 0xc0000000
call fcn.00402670
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x402669
mov ebx, esi
call fcn.00402740
push 2
lea eax, [esp + 0x10]
xor ebx, ebx
push eax
push ebx
push esi
mov dword [esp + 0x1c], ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, edi
mov dword [esp + 0x10], ebx
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x402648
push ebx
lea ecx, [esp + 0x14]
push ecx
sub eax, edx
push eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
pop ebx
add esp, 0xc
ret
Function at 0x402740
Capabilities:
Read file on windows
Write file on windows

Disassembly:
sub esp, 0x28
cmp ebx, 0xffffffff
push ebp
push esi
push edi
je 0x402865
cmp dword [0x40d44c], 2
jne 0x402865
call fcn.00402930
xor edi, edi
push edi
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x14]
push eax
push edi
push ebx
mov dword [esp + 0x3c], edx
mov dword [esp + 0x20], edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push edi
lea ecx, [esp + 0x18]
push ecx
push 8
lea edx, [esp + 0x2c]
push edx
push ebx
mov dword [esp + 0x28], edi
mov dword [esp + 0x34], edi
mov dword [esp + 0x38], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x402834
lea eax, [edi + 8]
lea edx, [esp + 0x28]
lea esi, [esp + 0x20]
mov ecx, dword [esi]
cmp ecx, dword [edx]
jne 0x4027c8
sub eax, 4
add edx, 4
add esi, 4
cmp eax, 4
jae 0x4027b0
cmp eax, edi
je 0x402825
movzx ecx, byte [esi]
movzx ebp, byte [edx]
sub ecx, ebp
jne 0x402817
sub eax, 1
add edx, 1
add esi, 1
cmp eax, edi
je 0x402825
movzx ecx, byte [esi]
movzx ebp, byte [edx]
sub ecx, ebp
jne 0x402817
sub eax, 1
add edx, 1
add esi, 1
cmp eax, edi
je 0x402825
movzx ecx, byte [esi]
movzx ebp, byte [edx]
sub ecx, ebp
jne 0x402817
sub eax, 1
add edx, 1
add esi, 1
cmp eax, edi
je 0x402825
movzx ecx, byte [esi]
movzx edx, byte [edx]
sub ecx, edx
je 0x402825
cmp ecx, edi
mov eax, 1
jg 0x402827
or eax, 0xffffffff
jmp 0x402827
xor eax, eax
xor ecx, ecx
cmp eax, edi
setne cl
mov eax, ecx
cmp eax, edi
je 0x402865
push edi
lea edx, [esp + 0x1c]
push edx
push edi
push ebx
mov dword [esp + 0x28], edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push edi
lea eax, [esp + 0x20]
push eax
push 8
lea ecx, [esp + 0x34]
push ecx
push ebx
mov dword [esp + 0x30], edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
pop edi
pop esi
pop ebp
add esp, 0x28
ret

Function at 0x402870
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x108
mov eax, dword [0x40d020]
xor eax, esp
mov dword [esp + 0x104], eax
push 0x103
lea eax, [esp + 5]
push 0
push eax
mov byte [esp + 0xc], 0
call sub.MSVCR80.dll_memset
add esp, 0xc
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
je 0x4028d6
push 0xed
push 0x40d558
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x4028d6
push 0x5c
push 0x40d558
call dword [sym.imp.MSVCR80.dll__mbsrchr]
add esp, 8
test eax, eax
je 0x4028d6
mov byte [eax + 1], 0
push edi
push str.ConfigKernelDebug.ini
push 0x40d558
push 0x40953c
mov eax, 0x104
lea edi, [esp + 0x10]
call fcn.00401050
add esp, 0xc
mov ecx, edi
push ecx
push 0
push str.Log2File
push str.Base
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov ecx, dword [esp + 0x108]
pop edi
xor ecx, esp
call fcn.00407568
add esp, 0x108
ret
Function at 0x4049b0
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
test ecx, ecx
push esi
push edi
mov edi, eax
mov esi, edx
jne 0x4049bf
pop edi
xor eax, eax
pop esi
ret
cmp edi, 8
not esi
jb 0x404aa7
push ebp
mov ebp, edi
shr ebp, 3
movzx edx, byte [ecx]
xor edx, esi
and edx, 0xff
add ecx, 1
mov eax, esi
shr eax, 8
xor eax, dword [edx*4 + 0x40abe8]
movzx edx, byte [ecx]
xor edx, eax
and edx, 0xff
shr eax, 8
xor eax, dword [edx*4 + 0x40abe8]
movzx edx, byte [ecx + 1]
xor edx, eax
and edx, 0xff
add ecx, 1
shr eax, 8
xor eax, dword [edx*4 + 0x40abe8]
movzx edx, byte [ecx + 1]
xor edx, eax
add ecx, 1
and edx, 0xff
shr eax, 8
xor eax, dword [edx*4 + 0x40abe8]
movzx edx, byte [ecx + 1]
xor edx, eax
add ecx, 1
and edx, 0xff
shr eax, 8
xor eax, dword [edx*4 + 0x40abe8]
movzx edx, byte [ecx + 1]
xor edx, eax
add ecx, 1
and edx, 0xff
shr eax, 8
xor eax, dword [edx*4 + 0x40abe8]
movzx edx, byte [ecx + 1]
add ecx, 1
xor edx, eax
and edx, 0xff
shr eax, 8
xor eax, dword [edx*4 + 0x40abe8]
movzx edx, byte [ecx + 1]
add ecx, 1
xor edx, eax
and edx, 0xff
shr eax, 8
xor eax, dword [edx*4 + 0x40abe8]
add ecx, 1
sub edi, 8
sub ebp, 1
mov esi, eax
jne 0x4049d0
pop ebp
test edi, edi
je 0x404acc
jmp 0x404ab0
movzx eax, byte [ecx]
xor eax, esi
and eax, 0xff
shr esi, 8
xor esi, dword [eax*4 + 0x40abe8]
add ecx, 1
sub edi, 1
jne 0x404ab0
mov eax, esi
pop edi
not eax
pop esi
ret

Function at 0x404ae0
Capabilities:
Hash data with crc32

Disassembly:
mov eax, dword [edx]
xor ecx, eax
shr eax, 8
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x40abe8]
xor ecx, eax
movzx eax, cl
add eax, dword [edx + 4]
mov dword [edx], ecx
mov ecx, dword [edx + 8]
imul eax, eax, 0x8088405
add eax, 1
mov dword [edx + 4], eax
shr eax, 0x18
xor eax, ecx
and eax, 0xff
shr ecx, 8
xor ecx, dword [eax*4 + 0x40abe8]
mov dword [edx + 8], ecx
ret

Function at 0x404b30
Capabilities:
Hash data with crc32

Disassembly:
mov ecx, dword [esi + 8]
push ebx
mov edx, ecx
and edx, 0xfffd
or edx, 2
mov ebx, edx
xor ebx, 1
imul ebx, edx
mov edx, dword [esi]
shr ebx, 8
xor al, bl
movzx ebx, al
xor ebx, edx
shr edx, 8
and ebx, 0xff
mov ebx, dword [ebx*4 + 0x40abe8]
xor ebx, edx
movzx edx, bl
add edx, dword [esi + 4]
mov dword [esi], ebx
imul edx, edx, 0x8088405
add edx, 1
mov dword [esi + 4], edx
shr edx, 0x18
xor edx, ecx
and edx, 0xff
shr ecx, 8
xor ecx, dword [edx*4 + 0x40abe8]
pop ebx
mov dword [esi + 8], ecx
ret

Function at 0x4052f0
Capabilities:
Read file on windows

Disassembly:
push esi
mov esi, ebx
imul esi, dword [esp + 8]
cmp byte [edi], 0
je 0x405322
mov ecx, dword [edi + 4]
push 0
lea eax, [esp + 0xc]
push eax
push esi
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x405318
mov byte [edi + 8], 1
mov eax, dword [esp + 8]
xor edx, edx
div ebx
pop esi
ret
mov ecx, dword [edi + 0x1c]
mov eax, dword [edi + 0x18]
push ebp
lea ebp, [ecx + esi]
cmp ebp, eax
pop ebp
jbe 0x405335
sub eax, ecx
mov esi, eax
mov eax, dword [edi + 0x14]
push esi
add eax, ecx
push eax
push edx
call sub.MSVCR80.dll_memcpy
add dword [edi + 0x1c], esi
mov eax, esi
add esp, 0xc
xor edx, edx
div ebx
pop esi
ret
Function at 0x405350
Capabilities:
Read file on windows

Disassembly:
sub esp, 8
cmp byte [esi], 0
push edi
mov edi, 1
je 0x405383
mov edx, dword [esi + 4]
push 0
lea eax, [esp + 0xc]
push eax
push edi
lea ecx, [esp + 0x13]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40537d
mov byte [esi + 8], 1
mov edi, dword [esp + 8]
jmp 0x4053af
mov eax, dword [esi + 0x18]
push ebx
mov ebx, dword [esi + 0x1c]
lea ecx, [ebx + 1]
cmp ecx, eax
jbe 0x405395
sub eax, ebx
mov edi, eax
mov edx, dword [esi + 0x14]
push edi
add edx, ebx
push edx
lea eax, [esp + 0x13]
push eax
call sub.MSVCR80.dll_memcpy
add esp, 0xc
add ebx, edi
mov dword [esi + 0x1c], ebx
pop ebx
cmp edi, 1
pop edi
jne 0x4053c6
movzx ecx, byte [esp + 3]
mov edx, dword [esp + 0xc]
mov dword [edx], ecx
xor eax, eax
add esp, 8
ret
cmp byte [esi], 0
je 0x4053c0
cmp byte [esi + 8], 0
je 0x4053c0
or eax, 0xffffffff
add esp, 8
ret
Function at 0x405460
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x18
cmp byte [esi], 0
je 0x4054a5
cmp byte [esi + 1], 0
je 0x4054ad
mov eax, dword [esi + 4]
push 2
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp byte [esi], 0
push ebp
je 0x4054c2
cmp byte [esi + 1], 0
je 0x4054b4
mov edx, dword [esi + 4]
push 1
push 0
push 0
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebp, eax
sub ebp, dword [esi + 0xc]
mov dword [esp + 4], ebp
jmp 0x4054cb
mov ecx, dword [esi + 0x18]
mov dword [esi + 0x1c], ecx
jmp 0x40547e
or eax, 0xffffffff
add esp, 0x18
ret
mov dword [esp + 4], 0
mov ebp, dword [esp + 4]
jmp 0x4054cb
mov eax, dword [esi + 0x1c]
mov dword [esp + 4], eax
mov ebp, eax
push edi
mov edi, 0xffff
cmp ebp, edi
mov dword [esp + 0xc], edi
jae 0x4054df
mov dword [esp + 0xc], ebp
mov edi, ebp
push ebx
push 0x404
call dword [sym.imp.MSVCR80.dll_malloc]
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x4054fe
pop ebx
pop edi
or eax, 0xffffffff
pop ebp
add esp, 0x18
ret
mov eax, 4
cmp edi, eax
mov dword [esp + 0x18], 0xffffffff
jbe 0x405623
jmp 0x40552c
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov ebp, dword [esp + 0xc]
add eax, 0x400
cmp eax, edi
mov dword [esp + 0x14], edi
ja 0x40553d
mov dword [esp + 0x14], eax
mov eax, ebp
sub eax, dword [esp + 0x14]
sub ebp, eax
cmp ebp, 0x404
mov dword [esp + 0x20], eax
jbe 0x405556
mov ebp, 0x404
cmp byte [esi], 0
je 0x40557b
cmp byte [esi + 1], 0
je 0x405623
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 4]
push 0
push 0
add ecx, eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x40557e
mov dword [esi + 0x1c], eax
cmp byte [esi], 0
mov edi, ebp
je 0x4055a6
mov ecx, dword [esi + 4]
push 0
lea eax, [esp + 0x20]
push eax
push ebp
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4055a0
mov byte [esi + 8], 1
mov eax, dword [esp + 0x1c]
jmp 0x4055cc
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x18]
lea edx, [eax + ebp]
cmp edx, ecx
jbe 0x4055b7
sub ecx, eax
mov edi, ecx
mov ecx, dword [esi + 0x14]
push edi
add ecx, eax
push ecx
push ebx
call sub.MSVCR80.dll_memcpy
add esp, 0xc
add dword [esi + 0x1c], edi
mov eax, edi
xor edx, edx
div ebp
cmp eax, 1
jne 0x405623
lea eax, [ebp - 3]
test eax, eax
jl 0x40560e
lea esp, [esp]
sub eax, 1
cmp byte [eax + ebx], 0x50
jne 0x4055fe
cmp byte [eax + ebx + 1], 0x4b
jne 0x4055fe
cmp byte [eax + ebx + 2], 5
jne 0x4055fe
cmp byte [eax + ebx + 3], 6
je 0x405604
test eax, eax
jge 0x4055e0
jmp 0x40560e
mov edx, dword [esp + 0x20]
add eax, edx
mov dword [esp + 0x18], eax
cmp dword [esp + 0x18], 0
jne 0x405623
mov eax, dword [esp + 0x10]
cmp dword [esp + 0x14], eax
jb 0x405520
push ebx
call dword [sym.imp.MSVCR80.dll_free]
mov eax, dword [esp + 0x1c]
add esp, 4
pop ebx
pop edi
pop ebp
add esp, 0x18
ret
Function at 0x405ff0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0xc
push ebx
push edi
mov edi, eax
xor ebx, ebx
cmp edi, ebx
jne 0x406008
pop edi
mov eax, 0xffffff9a
pop ebx
add esp, 0xc
ret
cmp dword [edi + 0x18], ebx
je 0x405ffd
cmp dword [edi + 0x7c], ebx
je 0x40601b
mov ebx, edi
call fcn.004063e0
xor ebx, ebx
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 0xc]
push ecx
lea edx, [esp + 0x18]
push edx
call fcn.00405d60
add esp, 0xc
test eax, eax
je 0x406041
pop edi
mov eax, 0xffffff99
pop ebx
add esp, 0xc
ret
push ebp
mov ebp, dword [sym.imp.MSVCR80.dll_malloc]
push esi
push 0x84
call ebp
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x406084
push 0x4000
call ebp
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
add esp, 4
cmp eax, ebx
mov dword [esi], eax
mov dword [esi + 0x44], ecx
mov dword [esi + 0x48], edx
mov dword [esi + 0x4c], ebx
jne 0x406091
push esi
call dword [sym.imp.MSVCR80.dll_free]
add esp, 4
pop esi
pop ebp
pop edi
mov eax, 0xffffff98
pop ebx
add esp, 0xc
ret
mov dword [esi + 0x40], ebx
mov ecx, dword [edi + 0x3c]
xor eax, eax
cmp dword [edi + 0x34], ebx
mov dword [esi + 0x54], ecx
mov dword [esi + 0x50], ebx
mov edx, dword [edi + 0x34]
sete al
mov dword [esi + 0x64], edx
mov ecx, dword [edi]
mov dword [esi + 0x60], ecx
mov edx, dword [edi + 0xc]
mov dword [esi + 0x68], edx
mov dword [esi + 0x18], ebx
cmp eax, ebx
jne 0x4060d9
lea eax, [esi + 4]
mov dword [esi + 0x24], ebx
mov dword [esi + 0x28], ebx
mov dword [esi + 0x2c], ebx
call fcn.00404df0
test eax, eax
jne 0x4060d9
mov dword [esi + 0x40], 1
mov eax, dword [edi + 0x40]
mov dword [esi + 0x58], eax
mov ecx, dword [edi + 0x44]
mov dword [esi + 0x5c], ecx
mov dl, byte [edi + 0x30]
and dl, 1
mov byte [esi + 0x6c], dl
mov eax, dword [edi + 0x30]
shr eax, 3
test al, 1
je 0x406103
mov cl, byte [edi + 0x39]
mov byte [esi + 0x80], cl
jmp 0x40610c
mov dl, byte [edi + 0x3f]
mov byte [esi + 0x80], dl
mov al, byte [esi + 0x6c]
mov ebp, dword [esp + 0x20]
neg al
lea edx, [esi + 0x70]
mov dword [edx], 0x12345678
mov dword [esi + 0x74], 0x23456789
mov dword [esi + 0x78], 0x34567890
sbb eax, eax
and eax, 0xc
cmp ebp, ebx
mov dword [esi + 0x7c], eax
je 0x406149
mov cl, byte [ebp]
cmp cl, bl
je 0x406149
call fcn.00404ae0
add ebp, 1
jne 0x406138
mov ecx, dword [edi + 0x78]
mov edx, dword [esp + 0x18]
lea eax, [ecx + edx + 0x1e]
mov dword [esi + 0x3c], eax
mov dword [esi + 8], ebx
mov dword [edi + 0x7c], esi
pop esi
pop ebp
pop edi
xor eax, eax
pop ebx
add esp, 0xc
ret
Function at 0x4064d0
Capabilities:
Get common file path

Disassembly:
push ecx
cmp dword [esi], 0
push edi
jne 0x406560
cmp dword [esi + 4], 0xffffffff
jne 0x406560
lea edi, [esi + 0x140]
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4064f8
sub eax, edx
mov al, byte [eax + esi + 0x13f]
cmp al, 0x5c
je 0x406528
cmp al, 0x2f
je 0x406528
add edi, 0xffffffff
mov al, byte [edi + 1]
add edi, 1
test al, al
jne 0x406515
mov ax, word [0x4095f0]
mov word [edi], ax
mov eax, dword [esp + 0xc]
lea ecx, [esp + 0xc]
push ecx
call fcn.00405250
add esp, 4
test eax, eax
jne 0x406546
mov eax, dword [esp + 0xc]
pop edi
pop ecx
ret 4
call fcn.00405640
mov dword [esi], eax
neg eax
sbb eax, eax
and eax, 0xfffffe00
add eax, 0x200
pop edi
pop ecx
ret 4
mov eax, 0x1000000
pop edi
pop ecx
ret 4

Function at 0x406af0
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
sub esp, 0x20c
mov eax, dword [0x40d020]
xor eax, esp
mov dword [esp + 0x208], eax
push ebp
mov ebp, dword [esp + 0x218]
push edi
mov edi, dword [esp + 0x218]
test edi, edi
je 0x406b2d
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x406b2d
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov al, byte [ebp]
test al, al
je 0x406bed
push esi
mov esi, ebp
mov ecx, ebp
lea ecx, [ecx]
cmp al, 0x2f
je 0x406b48
cmp al, 0x5c
jne 0x406b4a
mov esi, ecx
mov al, byte [ecx + 1]
add ecx, 1
test al, al
jne 0x406b40
cmp esi, ebp
je 0x406b82
sub esi, ebp
push esi
lea eax, [esp + 0x114]
push ebp
push eax
call sub.MSVCR80.dll_memcpy
lea ecx, [esp + 0x11c]
push ecx
push edi
mov byte [esp + esi + 0x124], 0
call fcn.00406af0
add esp, 0x14
test edi, edi
mov byte [esp + 0xc], 0
je 0x406b9f
lea edx, [esp + 0xc]
mov eax, edi
sub edx, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x406b93
mov eax, ebp
mov edx, ebp
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x406ba3
lea edi, [esp + 0xc]
sub eax, edx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x406bb5
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea edx, [esp + 0xc]
and ecx, 3
push edx
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
pop esi
jne 0x406bed
push 0
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ecx, dword [esp + 0x210]
pop edi
pop ebp
xor ecx, esp
call fcn.00407568
add esp, 0x20c
ret
Function at 0x407568
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x40d020]
jne 0x407572
repz ret
jmp fcn.0040799a
Function at 0x10005078
Capabilities:
Print debug messages

Disassembly:
push 0x50
mov eax, 0x1000aaae
call fcn.1000a687
mov eax, dword [ebp + 8]
mov ebx, dword [sym.imp.Utility.dll_public:_bool___thiscall_util::CppSQLite3DB::IsOpen_void_]
add eax, 4
mov ecx, eax
mov dword [ebp - 0x4c], eax
call ebx
test al, al
je 0x100050a6
xor eax, eax
inc eax
call fcn.1000a70a
ret 4
xor edi, edi
lea eax, [ebp - 0x5c]
push edi
push eax
call dword [sym.imp.Utility.dll_public:_static_class_util::AutoPtr_wchar_t____cdecl_util::PathHelper::GetModuleDir_struct_HINSTANCE____]
pop ecx
pop ecx
mov dword [ebp - 4], edi
push dword [eax]
lea ecx, [ebp - 0x48]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_wchar_t_const__]
mov byte [ebp - 4], 2
push dword [ebp - 0x5c]
mov esi, dword [sym.imp.ole32.dll_CoTaskMemFree]
call esi
lea eax, [ebp - 0x48]
push 1
push eax
mov dword [ebp - 0x5c], edi
mov dword [ebp - 0x58], edi
call dword [sym.imp.Utility.dll_public:_static_void___cdecl_util::StringHelper::AddSlash_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t_____bool_]
cmp dword [ebp - 0x30], 8
mov eax, dword [ebp - 0x44]
pop ecx
pop ecx
jae 0x100050f2
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x54]
push str._sConfigDB_
push eax
call dword [sym.imp.Utility.dll_public:_static_class_util::AutoPtr_wchar_t____cdecl_util::StringHelper::FormatW_wchar_t_const__]
add esp, 0xc
mov byte [ebp - 4], 3
push dword [eax]
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_wchar_t_const__]
mov byte [ebp - 4], 5
push dword [ebp - 0x54]
call esi
cmp dword [ebp - 0x14], 8
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x54], edi
mov dword [ebp - 0x50], edi
jae 0x1000512f
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.Utility.dll_public:_static_int___cdecl_util::PathHelper::MakeSurePathExists_wchar_t_const__]
lea ecx, [ebp - 0x2c]
mov dword [esp], str.st.db
call dword [0x1000d044]
cmp dword [ebp - 0x14], 8
mov eax, dword [ebp - 0x28]
jae 0x10005152
lea eax, [ebp - 0x28]
mov ecx, dword [ebp - 0x4c]
push 0x1000dd3c
push eax
call dword [sym.imp.Utility.dll_public:_void___thiscall_util::CppSQLite3DB::open_wchar_t_const___char_const__]
mov ecx, dword [ebp - 0x4c]
call ebx
test al, al
jne 0x10005196
push str.Open_DB_Failed_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 2
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x48]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov eax, edi
jmp 0x1000509e
xor edi, edi
inc edi
jmp 0x10005175