joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4bf7a0
Capabilities:
Encode data using base64
Terminate process

Disassembly:
sub esp, 0x118
mov ecx, 0x3f
mov eax, 0x80808080
push ebx
push ebp
push esi
push edi
lea edi, [esp + 0x28]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, 0x41
mov cl, al
sub cl, 0x41
mov byte [esp + eax + 0x28], cl
inc eax
cmp eax, 0x5a
jle 0x4bf7c2
mov eax, 0x61
mov dl, al
sub dl, 0x47
mov byte [esp + eax + 0x28], dl
inc eax
cmp eax, 0x7a
jle 0x4bf7d6
mov eax, 0x30
mov cl, al
add cl, 4
mov byte [esp + eax + 0x28], cl
inc eax
cmp eax, 0x39
jle 0x4bf7ea
mov edi, dword [esp + 0x12c]
or ecx, 0xffffffff
xor eax, eax
xor ebp, ebp
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + 0x53], 0x3e
mov byte [esp + 0x57], 0x3f
mov byte [esp + 0x65], 0
mov dword [esp + 0x18], ebp
je 0x4bf97d
mov ebx, dword [esp + 0x130]
mov dword [esp + 0x10], 3
mov dword [esp + 0x14], 4
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x12c]
xor eax, eax
lea esi, [edx + ecx]
movsx ecx, byte [esi + eax]
mov dl, byte [esp + ecx + 0x28]
test dl, 0x80
jne 0x4bf94e
mov byte [esp + eax + 0x20], cl
mov byte [esp + eax + 0x1c], dl
inc eax
cmp eax, 4
jl 0x4bf84c
mov esi, dword [esp + 0x138]
mov edx, dword [esp + 0x10]
cmp edx, dword [esi]
jle 0x4bf8b6
mov eax, dword [esp + 0x14]
push eax
call fcn.004c65c7
mov ecx, dword [esi]
mov esi, ebx
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
and ecx, 3
mov dword [esp + 0x2c], eax
rep movsb byte es:[edi], byte [esi]
call fcn.004c64de
mov ecx, dword [esp + 0x140]
mov eax, dword [esp + 0x18]
mov ebx, dword [esp + 0x2c]
add esp, 8
mov dword [ecx], eax
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x10]
mov dl, ch
mov al, cl
sar dl, 4
shl al, 2
or dl, al
mov eax, dword [esp + 0x14]
mov byte [ebx + ebp], dl
inc ebp
inc eax
mov cl, ch
mov dword [esp + 0x14], eax
mov al, byte [esp + 0x1e]
mov dl, al
inc edi
sar dl, 2
shl cl, 4
or dl, cl
mov ecx, dword [esp + 0x14]
shl al, 6
or al, byte [esp + 0x1f]
mov byte [ebx + ebp], dl
inc ebp
mov edx, edi
inc ecx
inc edx
mov byte [ebx + ebp], al
mov al, byte [esp + 0x22]
inc ebp
inc ecx
inc edx
mov dword [esp + 0x10], edi
cmp al, 0x3d
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], edx
je 0x4bf963
mov cl, byte [esp + 0x23]
xor eax, eax
cmp cl, 0x3d
setne al
add eax, 2
cmp eax, 3
jl 0x4bf963
mov edx, dword [esp + 0x18]
mov edi, dword [esp + 0x12c]
or ecx, 0xffffffff
xor eax, eax
add edx, 4
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x18], edx
cmp edx, ecx
jae 0x4bf984
jmp 0x4bf83c
push ecx
push str.Illegal_character__c_in_input._n
call fcn.004c7d2d
add esp, 8
push 1
call fcn.004c8182
mov eax, dword [esp + 0x134]
mov byte [ebx + ebp], 0
pop edi
pop esi
mov dword [eax], ebp
mov eax, ebx
pop ebp
pop ebx
add esp, 0x118
ret
mov ebx, dword [esp + 0x130]
mov ecx, dword [esp + 0x134]
mov byte [ebx + ebp], 0
pop edi
pop esi
mov dword [ecx], ebp
mov eax, ebx
pop ebp
pop ebx
add esp, 0x118
ret
Function at 0x4dbd1b
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x4dbd53
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.004d9da8
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.004d9d80
jmp 0x4dbd5f
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x4dd410
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x4dd452
call fcn.004e2fa1
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x4dd452
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x4dd449
xor eax, eax
jmp 0x4dd45a
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.004dd460
pop edi
pop esi
pop ebx
ret 4

Function at 0x4e34d1
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x4e34ff
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4e351d
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.004e3437
jmp 0x4e351d
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4e351d
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.004e3437
test edi, edi
mov eax, edi
jne 0x4e3507
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x4097c0
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [0x455c0c]
test eax, eax
jne 0x4097d8
call fcn.00409860
mov dword [0x455c0c], 1
mov ecx, dword [esp + 4]
or eax, 0xffffffff
dec ecx
js 0x409808
push ebx
push esi
lea esi, [ecx + 1]
mov ecx, dword [esp + 0x10]
mov edx, eax
xor ebx, ebx
mov bl, byte [ecx]
shr edx, 0x18
xor edx, ebx
shl eax, 8
mov edx, dword [edx*4 + 0x45540c]
xor eax, edx
inc ecx
dec esi
jne 0x4097eb
pop esi
pop ebx
not eax
ret

Function at 0x409810
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [0x455c10]
test eax, eax
jne 0x409828
call fcn.004098a0
mov dword [0x455c10], 1
mov ecx, dword [esp + 4]
or eax, 0xffffffff
dec ecx
js 0x40985b
push esi
lea esi, [ecx + 1]
mov ecx, dword [esp + 0xc]
push edi
xor edx, edx
mov edi, eax
mov dl, byte [ecx]
and edi, 0xff
xor edx, edi
shr eax, 8
mov edx, dword [edx*4 + 0x45580c]
xor eax, edx
inc ecx
dec esi
jne 0x40983b
pop edi
pop esi
not eax
ret

Function at 0x409860
Capabilities:
Hash data using crc32b

Disassembly:
push esi
xor edx, edx
mov ecx, 0x45540c
mov eax, edx
mov esi, 8
shl eax, 0x18
test eax, 0x80000000
je 0x409882
add eax, eax
xor eax, 0x4c11db7
jmp 0x409884
shl eax, 1
dec esi
jne 0x409872
mov dword [ecx], eax
add ecx, 4
inc edx
cmp ecx, 0x455808
jle 0x409868
pop esi
ret

Function at 0x4098a0
Capabilities:
Hash data with crc32

Disassembly:
push esi
xor edx, edx
mov ecx, 0x45580c
mov eax, edx
mov esi, 8
test al, 1
je 0x4098bc
shr eax, 1
xor eax, 0xedb88320
jmp 0x4098be
shr eax, 1
dec esi
jne 0x4098af
mov dword [ecx], eax
add ecx, 4
inc edx
cmp ecx, 0x455c08
jle 0x4098a8
pop esi
ret
Function at 0x40e710
Capabilities:
Create thread

Disassembly:
push ebx
push ebp
push esi
push edi
mov esi, ecx
call fcn.0040e820
mov eax, dword [0x461794]
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [sym.imp.KERNEL32.dll_CreateEventA]
xor ebx, ebx
cmp eax, ebx
jne 0x40e745
push ebx
push ebx
push ebx
push ebx
call edi
cmp eax, ebx
mov dword [0x461794], eax
je 0x40e7d1
cmp dword [0x461798], ebx
jne 0x40e761
push ebx
push ebx
push ebx
push ebx
call edi
cmp eax, ebx
mov dword [0x461798], eax
je 0x40e7bf
mov eax, dword [0x461794]
mov edi, dword [sym.imp.KERNEL32.dll_ResetEvent]
push eax
call edi
mov eax, dword [0x461798]
push eax
call edi
mov eax, dword [0x461794]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov edi, 1
push eax
mov dword [0x46177c], ecx
mov dword [0x461780], edx
mov dword [0x461788], edi
mov dword [0x461784], ebx
call dword [sym.imp.KERNEL32.dll_SetEvent]
lea ecx, [esi + 4]
mov dword [esi + 8], ebx
push ecx
push ebx
push ebx
push 0x40ebb0
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, ebx
mov dword [esi], eax
jne 0x40e7ec
mov eax, dword [0x461794]
cmp eax, ebx
je 0x40e7d1
push eax
call ebp
mov dword [0x461794], ebx
mov eax, dword [0x461798]
cmp eax, ebx
je 0x40e7e3
push eax
call ebp
mov dword [0x461798], ebx
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret 8
mov edx, dword [esi + 0xc]
mov ecx, dword [edx*4 + 0x44d078]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov edx, dword [0x461798]
push 0xffffffffffffffff
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [0x461784], edi
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret 8
Function at 0x4141df
Capabilities:
Create directory

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4415a8
push eax
mov eax, dword [0x461784]
mov dword fs:[0], esp
sub esp, 0x30
test eax, eax
push esi
mov esi, ecx
je 0x4143fb
mov eax, dword [esi + 0x40188]
lea ecx, [esp + 0x14]
push eax
push str.st_1X
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
mov dl, byte [esp + 0x54]
add esp, 0xc
lea ecx, [esp + 4]
mov byte [esp + 4], dl
push 0
call fcn.00404ef0
mov eax, dword [0x4534e4]
mov dword [esp + 0x3c], 0
test eax, eax
je 0x414284
push 0
push 0x453700
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ecx, dword [esi + 0x40184]
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x28]
mov edx, dword [ecx + 0x14]
add edx, 0x1d0
push edx
push 0x453700
push eax
call fcn.00417a10
add esp, 0x10
mov ecx, dword [0x442360]
mov byte [esp + 0x3c], 1
push ecx
push 0
push eax
lea ecx, [esp + 0x10]
call fcn.00404cf0
push 1
lea ecx, [esp + 0x28]
mov byte [esp + 0x40], 0
call fcn.00404ef0
jmp 0x4142ee
mov edx, dword [esi + 0x40184]
lea ecx, [esp + 0x14]
push ecx
mov eax, dword [edx + 0x14]
lea edx, [eax + 0x1d0]
add eax, 0xcc
push edx
push eax
lea eax, [esp + 0x30]
push eax
call fcn.00417a10
add esp, 0x10
mov ecx, dword [0x442360]
mov byte [esp + 0x3c], 2
push ecx
push 0
push eax
lea ecx, [esp + 0x10]
call fcn.00404cf0
mov eax, dword [esp + 0x28]
mov byte [esp + 0x3c], 0
test eax, eax
je 0x4142ee
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x4142e5
cmp al, 0xff
je 0x4142e5
dec al
mov byte [ecx], al
jmp 0x4142ee
push ecx
call fcn.00435930
add esp, 4
mov eax, dword [esp + 0x48]
cmp eax, 0x8103
jne 0x41439f
mov eax, dword [esp + 8]
test eax, eax
jne 0x41430a
mov eax, 0x442380
mov edx, dword [esi + 0x40184]
mov ecx, dword [edx + 0x14]
push ecx
push eax
call fcn.0042ae40
add esp, 8
test eax, eax
jl 0x414386
cmp eax, 0x22
jne 0x414386
mov eax, dword [0x453c30]
test eax, eax
je 0x414386
push 0x34
push str.VirtuaNES
push 0x22
call fcn.004011d0
mov edx, dword [esi + 4]
add esp, 4
push eax
push edx
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 6
je 0x414386
mov ecx, dword [esp + 8]
test ecx, ecx
je 0x4143fb
mov al, byte [ecx - 1]
test al, al
je 0x4143f1
cmp al, 0xff
je 0x4143f1
dec al
pop esi
mov byte [ecx - 1], al
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
add esp, 0x3c
ret 8
mov eax, dword [esp + 8]
test eax, eax
jne 0x414393
mov eax, 0x442380
mov ecx, dword [esi + 0x40188]
push ecx
push eax
push 0xf
jmp 0x4143bd
cmp eax, 0x8104
jne 0x4143c7
mov eax, dword [esp + 8]
test eax, eax
jne 0x4143b3
mov eax, 0x442380
mov edx, dword [esi + 0x40188]
push edx
push eax
push 0x10
mov ecx, 0x461768
call fcn.0040ea40
mov ecx, dword [esp + 8]
test ecx, ecx
je 0x4143fb
mov al, byte [ecx - 1]
test al, al
je 0x4143f1
cmp al, 0xff
je 0x4143f1
dec al
pop esi
mov byte [ecx - 1], al
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
add esp, 0x3c
ret 8
dec ecx
push ecx
call fcn.00435930
add esp, 4
mov ecx, dword [esp + 0x34]
pop esi
mov dword fs:[0], ecx
add esp, 0x3c
ret 8
Function at 0x416530
Capabilities:
Initialize winsock library

Disassembly:
push esi
push edi
mov esi, ecx
call fcn.00416580
lea edi, [esi + 0x14]
push edi
push 0x101
call sub.WSOCK32.dll_WSAStartup
test eax, eax
je 0x416552
pop edi
xor eax, eax
pop esi
ret 4
cmp word [edi], 0x101
je 0x416565
call sub.WSOCK32.dll_WSACleanup
pop edi
xor eax, eax
pop esi
ret 4
mov eax, dword [esp + 0xc]
pop edi
mov dword [esi], eax
mov eax, 1
pop esi
ret 4
Function at 0x4168a0
Capabilities:
Send data
Send data on socket

Disassembly:
push esi
mov esi, ecx
cmp dword [esi], 0
je 0x4168d8
mov eax, dword [esi + 0xc]
test eax, eax
je 0x4168d8
mov eax, dword [esi + 0x1a8]
cmp eax, 0xffffffff
je 0x4168d8
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 8]
push 0
push ecx
push edx
push eax
call sub.WSOCK32.dll_send
cmp eax, 0xffffffff
jne 0x4168df
mov ecx, esi
call fcn.00416850
or eax, 0xffffffff
pop esi
ret 8
xor eax, eax
pop esi
ret 8

Function at 0x4168f0
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ecx
push esi
mov esi, ecx
push edi
cmp dword [esi], 0
je 0x416965
mov eax, dword [esi + 0xc]
test eax, eax
je 0x416965
mov eax, dword [esi + 0x1a8]
cmp eax, 0xffffffff
je 0x416965
lea ecx, [esp + 8]
mov dword [esp + 8], 0
push ecx
push 0x4004667f
push eax
call sub.WSOCK32.dll_ioctlsocket
cmp eax, 0xffffffff
je 0x41695e
mov eax, dword [esp + 8]
test eax, eax
jne 0x416939
pop edi
xor eax, eax
pop esi
pop ecx
ret 8
mov edi, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
mov eax, dword [esi + 0x1a8]
push 0
push edi
push edx
push eax
call sub.WSOCK32.dll_recv
cmp eax, 0xffffffff
je 0x41695e
mov eax, edi
pop edi
pop esi
pop ecx
ret 8
mov ecx, esi
call fcn.00416850
pop edi
or eax, 0xffffffff
pop esi
pop ecx
ret 8
Function at 0x4169d7
Capabilities:
Set socket configuration

Disassembly:
mov eax, dword [esp + 0xc]
sub esp, 0x18
push esi
mov esi, ecx
mov ecx, eax
shr ecx, 0x10
je 0x416a0c
mov ecx, esi
call fcn.00416850
mov esi, dword [esi + 4]
test esi, esi
je 0x416b93
push 0
push 0
push 0x8070
push esi
call dword [sym.imp.USER32.dll_PostMessageA]
xor eax, eax
pop esi
add esp, 0x18
ret 0xc
and eax, 0xffff
cmp eax, 8
je 0x416a90
cmp eax, 0x10
je 0x416a4f
cmp eax, 0x20
jne 0x416b93
mov ecx, esi
call fcn.00416850
mov esi, dword [esi + 4]
test esi, esi
je 0x416b93
push 0
push 0
push 0x8070
push esi
call dword [sym.imp.USER32.dll_PostMessageA]
xor eax, eax
pop esi
add esp, 0x18
ret 0xc
mov edx, dword [esi]
mov eax, dword [esi + 0x1a8]
push 0x20
push 0x8064
push edx
push eax
call sub.WSOCK32.dll_WSAAsyncSelect
mov dword [esi + 0xc], 1
mov esi, dword [esi + 4]
test esi, esi
je 0x416b93
push 0
push 0
push 0x806f
push esi
call dword [sym.imp.USER32.dll_PostMessageA]
xor eax, eax
pop esi
add esp, 0x18
ret 0xc
mov eax, dword [esi + 0x1a4]
lea ecx, [esp + 0x28]
lea edx, [esp + 0xc]
push ecx
push edx
push eax
mov dword [esp + 0x34], 0x10
call sub.WSOCK32.dll_accept
cmp eax, 0xffffffff
mov dword [esi + 0x1a8], eax
jne 0x416ad6
mov eax, dword [esi + 0x1a4]
cmp eax, 0xffffffff
je 0x416b3f
push eax
call sub.WSOCK32.dll_closesocket
mov dword [esi + 0x1a4], 0xffffffff
jmp 0x416b3f
lea ecx, [esp + 4]
push 4
push ecx
push 1
push 6
push eax
mov dword [esp + 0x18], 1
call sub.WSOCK32.dll_setsockopt
cmp eax, 0xffffffff
jne 0x416b01
mov eax, dword [esi + 0x1a8]
cmp eax, 0xffffffff
je 0x416b3f
jmp 0x416b2f
mov eax, dword [esi + 0x1a8]
lea edx, [esp + 8]
push edx
push 0x8004667e
push eax
mov dword [esp + 0x14], 1
call sub.WSOCK32.dll_ioctlsocket
cmp eax, 0xffffffff
jne 0x416b5f
mov eax, dword [esi + 0x1a8]
cmp eax, 0xffffffff
je 0x416b3f
push eax
call sub.WSOCK32.dll_closesocket
mov dword [esi + 0x1a8], 0xffffffff
mov esi, dword [esi + 4]
test esi, esi
je 0x416b93
push 0
push 0
push 0x8071
push esi
call dword [sym.imp.USER32.dll_PostMessageA]
xor eax, eax
pop esi
add esp, 0x18
ret 0xc
mov ecx, dword [esi]
mov edx, dword [esi + 0x1a8]
push 0x20
push 0x8064
push ecx
push edx
call sub.WSOCK32.dll_WSAAsyncSelect
mov dword [esi + 0xc], 1
mov esi, dword [esi + 4]
test esi, esi
je 0x416b93
push 0
push 0
push 0x806e
push esi
call dword [sym.imp.USER32.dll_PostMessageA]
xor eax, eax
pop esi
add esp, 0x18
ret 0xc

Function at 0x418730
Capabilities:
Read .ini file

Disassembly:
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
push 0x44d460
push eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
ret

Function at 0x418750
Capabilities:
Read .ini file

Disassembly:
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
push esi
mov esi, dword [esp + 0x14]
push 0x44d460
push esi
push eax
push 0x453440
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
cmp eax, esi
pop esi
sbb eax, eax
neg eax
ret
Function at 0x418780
Capabilities:
Read .ini file

Disassembly:
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 8]
push 0x44d460
push eax
mov eax, dword [esp + 0xc]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStructA]
ret
Function at 0x4221f0
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push 0xffffffffffffffff
push 0x441881
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 + 0x30]
call fcn.0041fb50
xor ebx, ebx
lea ecx, [esi + 0x180]
mov dword [esp + 0x18], ebx
call fcn.00421ba0
lea ecx, [esi + 0x1d4]
mov byte [esp + 0x18], 1
call fcn.00422080
lea ecx, [esi + 0x1e0]
mov byte [esp + 0x18], 2
call fcn.00421280
lea ecx, [esi + 0x248]
mov byte [esp + 0x18], 3
call fcn.0041ed00
lea ecx, [esi + 0x6a8]
mov byte [esp + 0x18], 4
call fcn.00421780
lea ecx, [esi + 0xb78]
mov byte [esp + 0x18], 5
call fcn.0041f6d0
mov eax, dword [esp + 0x20]
mov dword [esi], 0x442cbc
mov byte [esi + 0xc], bl
mov dword [esi + 8], eax
mov dword [esi + 0x170], eax
mov ecx, 0x80
xor eax, eax
lea edi, [esi + 0xcac]
mov dword [esi + 0x1c], ebx
mov dword [esi + 0x18], ebx
rep stosd dword es:[edi], eax
lea ecx, [esi + 0x20]
mov edi, 0x4c71d8
mov dword [ecx], eax
mov dword [ecx + 4], eax
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], eax
mov ecx, 0x2002
rep stosd dword es:[edi], eax
mov ecx, 0x2002
mov edi, 0x4cf1e0
rep stosd dword es:[edi], eax
lea edi, [esi + 0xc6c]
mov ecx, 0x10
mov eax, 1
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x10]
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x10
ret 4
Function at 0x43d7b5
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x44fb18
cmp edx, dword [eax]
je 0x43d7d7
add eax, 8
inc ecx
cmp eax, 0x44fba8
jl 0x43d7c8
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x44fb18]
jne 0x43d905
mov eax, dword [0x50e584]
cmp eax, 1
je 0x43d8df
test eax, eax
jne 0x43d808
cmp dword [0x44efa4], 1
je 0x43d8df
cmp edx, 0xfc
je 0x43d905
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x43d83f
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.0043d910
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.00437c70
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x43d882
lea eax, [ebp - 0x1a4]
push eax
call fcn.00437c70
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x44332c
push edi
call fcn.0043ed40
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.0043d910
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.0043d920
lea eax, [ebp - 0xa0]
push 0x44330c
push eax
call fcn.0043d920
push dword [esi + 0x44fb1c]
lea eax, [ebp - 0xa0]
push eax
call fcn.0043d920
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.0043fdb0
add esp, 0x2c
pop edi
jmp 0x43d905
lea eax, [ebp + 8]
lea esi, [esi + 0x44fb1c]
push 0
push eax
push dword [esi]
call fcn.00437c70
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret
Function at 0x40b060
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x43597b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1bc
mov eax, dword [0x44be60]
push ebx
push 0
mov dword [esp + 0x1c0], eax
push 5
lea eax, [esp + 0xc0]
push eax
push 0
mov ebx, ecx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
test eax, eax
jne 0x40b0a9
xor al, al
jmp 0x40b281
push edi
lea edi, [esp + 0xbc]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40b0b2
push esi
mov ecx, 6
mov esi, str.KOEIShin_Sangokumusou_3_
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0xc0]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40b0d2
mov ecx, dword [str.network.cfg]
mov edx, dword [0x4388e8]
mov eax, dword [0x4388ec]
mov dword [edi], ecx
mov dword [edi + 4], edx
push 1
lea ecx, [esp + 0x10]
mov dword [edi + 8], eax
call fcn.00403910
push 0x1b6
push 0x21
lea ecx, [esp + 0xc8]
push ecx
lea ecx, [esp + 0x24]
mov dword [esp + 0x1dc], 0
call fcn.00402dd0
test eax, eax
jne 0x40b14a
mov edx, dword [esp + 0xc]
mov ecx, dword [edx + 4]
mov eax, dword [esp + ecx + 0x14]
mov edx, dword [esp + ecx + 0x34]
lea ecx, [esp + ecx + 0xc]
or eax, 2
test edx, edx
jne 0x40b142
or eax, 4
push 0
push eax
call fcn.004266b9
mov eax, dword [esp + 0x70]
test eax, eax
je 0x40b258
push 2
push 0
lea ecx, [esp + 0x14]
call fcn.00401a00
lea eax, [esp + 0xa8]
push eax
lea ecx, [esp + 0x10]
call fcn.00401a70
mov esi, dword [eax + 8]
mov edi, dword [eax]
push 0
push 0
lea ecx, [esp + 0x14]
add esi, edi
call fcn.00401a00
cmp esi, 0x140
lea ecx, [esp + 0xc]
jne 0x40b253
push 4
push ebx
call fcn.00402be0
cmp dword [ebx], 0x3f800000
jne 0x40b258
push 4
lea ecx, [ebx + 4]
push ecx
lea ecx, [esp + 0x14]
call fcn.00402be0
push 4
lea edx, [ebx + 8]
push edx
lea ecx, [esp + 0x14]
call fcn.00402be0
push 4
lea eax, [ebx + 0xc]
push eax
lea ecx, [esp + 0x14]
call fcn.00402be0
push 0x104
lea ecx, [ebx + 0x10]
push ecx
lea ecx, [esp + 0x14]
call fcn.00402be0
push 4
lea edx, [ebx + 0x114]
push edx
lea ecx, [esp + 0x14]
call fcn.00402be0
push 0x14
lea eax, [ebx + 0x118]
push eax
lea ecx, [esp + 0x14]
call fcn.00402be0
push 0x14
add ebx, 0x12c
push ebx
lea ecx, [esp + 0x14]
call fcn.00402be0
lea ecx, [esp + 0xc]
call fcn.00403820
lea ecx, [esp + 0x74]
mov dword [esp + 0x1d0], 0xffffffff
call fcn.004039d0
lea ecx, [esp + 0x74]
mov dword [esp + 0x74], 0x4375a0
call fcn.004265cf
mov al, 1
jmp 0x40b27f
call fcn.00403820
lea ecx, [esp + 0x74]
mov dword [esp + 0x1d0], 0xffffffff
call fcn.004039d0
lea ecx, [esp + 0x74]
mov dword [esp + 0x74], 0x4375a0
call fcn.004265cf
xor al, al
pop esi
pop edi
mov ecx, dword [esp + 0x1c0]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x1bc]
pop ebx
call fcn.00418291
add esp, 0x1c8
ret
Function at 0x40bc80
Capabilities:
Print debug messages

Disassembly:
sub esp, 8
push esi
mov esi, ecx
push esi
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
mov eax, dword [esi]
mov ecx, dword [esi + 4]
mov dword [esp + 4], eax
or eax, ecx
mov dword [esp + 8], ecx
jne 0x40bcb3
push str.System_does_not_support_high_resolution_timers_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, 0x80004005
pop esi
add esp, 8
ret
fild qword [esp + 4]
lea eax, [esi + 8]
push eax
fdivr dword [0x438108]
fstp dword [esi + 0x2c]
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov byte [esi + 0x39], 1
xor eax, eax
pop esi
add esp, 8
ret

Function at 0x40bce0
Capabilities:
Print debug messages

Disassembly:
push esi
mov esi, ecx
mov al, byte [esi + 0x39]
test al, al
jne 0x40bcfd
push str.PCTimer_class_not_initialised._n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
fld qword [0x438358]
pop esi
ret
push ebx
push edi
lea edi, [esi + 0x10]
push edi
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
fld dword [esi + 0x2c]
mov eax, dword [edi]
mov edx, dword [esi + 8]
mov edi, dword [edi + 4]
mov ebx, dword [esi + 0xc]
mov ecx, eax
sub ecx, edx
mov edx, edi
sbb edx, ebx
mov dword [esi + 0x20], ecx
mov dword [esi + 0x24], edx
fild qword [esi + 0x20]
mov dword [esi + 8], eax
mov al, byte [esi + 0x38]
test al, al
fmulp st(1)
mov dword [esi + 0xc], edi
pop edi
fst qword [esi + 0x30]
pop ebx
je 0x40bd44
fstp st(0)
fld qword [0x438358]
pop esi
ret

Function at 0x40e4c7
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x40e4dc
pop ebp
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
jne 0x40e4ee
xor eax, eax
jmp 0x40e520
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 0x10]
add eax, esi
and ecx, 0xf
jbe 0x40e512
cmp esi, eax
jae 0x40e4ea
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x40e504
cmp esi, eax
jae 0x40e4ea
mov ax, word [esi]
neg ax
sbb eax, eax
and eax, esi
pop esi
pop ebp
ret