joyce8/EMBER2024-capa huggingface dataset:
Function at 0x48a9b7
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x4a4334]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x18], eax
call fcn.004856bd
add eax, 0x50
lea edi, [ebp - 0x10]
mov dword [ebp - 0x14], eax
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.004856bd
lea ecx, [ebp - 0x10]
xor edx, edx
mov dword [eax + 0x34c], ecx
lea ecx, [esi + 0x80]
mov eax, dword [ebp - 0x14]
mov dword [eax], esi
lea edi, [eax + 4]
mov dword [edi], ecx
test ecx, ecx
je 0x48aa2e
cmp word [ecx], dx
je 0x48aa2e
mov eax, dword [0x498bb4]
push edi
dec eax
push eax
push 0x498aa0
call fcn.0048aba7
mov eax, dword [ebp - 0x14]
add esp, 0xc
xor edx, edx
mov dword [ebp - 0x10], edx
mov eax, dword [eax]
test eax, eax
je 0x48aaa1
cmp word [eax], dx
je 0x48aaa1
mov eax, dword [edi]
test eax, eax
je 0x48aa52
cmp word [eax], dx
je 0x48aa52
lea eax, [ebp - 0x10]
push eax
call fcn.0048ac0e
jmp 0x48aa5b
lea eax, [ebp - 0x10]
push eax
call fcn.0048aefd
cmp dword [ebp - 0x10], 0
pop ecx
jne 0x48aacb
mov eax, dword [0x498a9c]
push dword [ebp - 0x14]
dec eax
push eax
push 0x498790
call fcn.0048aba7
add esp, 0xc
test al, al
je 0x48aacb
mov eax, dword [edi]
xor edi, edi
test eax, eax
je 0x48aa96
cmp word [eax], di
je 0x48aa96
lea eax, [ebp - 0x10]
push eax
call fcn.0048ac0e
pop ecx
jmp 0x48aacd
lea eax, [ebp - 0x10]
push eax
call fcn.0048aefd
jmp 0x48aa93
mov eax, dword [edi]
test eax, eax
je 0x48aab8
cmp word [eax], dx
je 0x48aab8
lea eax, [ebp - 0x10]
push eax
call fcn.0048b02d
pop ecx
jmp 0x48aacb
mov dword [ebp - 0x10], 0x104
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
xor edi, edi
cmp dword [ebp - 0x10], 0
je 0x48ab96
lea eax, [ebp - 0x10]
push eax
lea eax, [esi + 0x100]
neg esi
sbb esi, esi
and esi, eax
push esi
call fcn.0048b11b
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x48ab96
movzx ecx, si
push ecx
call dword [sym.imp.KERNEL32.dll_IsValidCodePage]
test eax, eax
je 0x48ab96
push 1
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_IsValidLocale]
test eax, eax
je 0x48ab96
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x48ab23
mov dword [eax], esi
mov eax, dword [ebp - 0x14]
push edi
push 0x55
add eax, 0x250
push eax
push dword [ebp - 0xc]
call fcn.004860b2
test ebx, ebx
je 0x48ab91
push edi
push 0x55
lea eax, [ebx + 0x120]
push eax
push dword [ebp - 0xc]
call fcn.004860b2
push 0x40
push ebx
push 0x1001
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x48ab96
push 0x40
lea eax, [ebx + 0x80]
push eax
push 0x1002
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x48ab96
push 0xa
push 0x10
lea ecx, [ebx + 0x100]
push ecx
push esi
call fcn.0049211a
add esp, 0x10
xor eax, eax
inc eax
jmp 0x48ab98
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004781c4
leave
ret
Function at 0x48b221
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
call fcn.004856bd
mov esi, dword [ebp + 8]
mov edi, eax
push 2
lea eax, [ebp - 4]
mov ecx, esi
push eax
and ecx, 0x3ff
push 0x20000001
or ecx, 0x400
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x48b290
cmp esi, dword [ebp - 4]
je 0x48b28b
cmp dword [ebp + 0xc], 0
je 0x48b28b
mov esi, dword [edi + 0x50]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x48b268
push dword [edi + 0x50]
sub esi, ecx
sar esi, 1
call fcn.0048b2ea
pop ecx
xor ecx, ecx
cmp eax, esi
setne cl
mov eax, ecx
jmp 0x48b292
xor eax, eax
inc eax
jmp 0x48b292
xor eax, eax
pop edi
pop esi
leave
ret
Function at 0x48c459
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x1020
call fcn.00475b30
mov eax, dword [0x4a4334]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x100c], eax
call fcn.00488eb6
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x48c49b
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x48c612
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.004759c0
push dword [ebp - 0x100c]
mov ecx, ebx
mov dword [ebp - 0x1008], eax
mov esi, ebx
mov dword [ebp - 0x1014], edx
and ecx, 0x3f
sar esi, 6
imul edi, ecx, 0x38
push 0
mov eax, dword [esi*4 + 0x4a5e40]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.0048c1e9
mov ecx, dword [esi*4 + 0x4a5e40]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x1020], eax
cmp edx, dword [edi + ecx + 0x20]
jne 0x48c60b
cmp eax, dword [edi + ecx + 0x24]
jne 0x48c60b
xor esi, esi
lea eax, [ebp - 0x101c]
push esi
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [edi + ecx + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x48c60b
push dword [ebp - 0x100c]
push esi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0048c1e9
add esp, 0x14
cmp edx, esi
jl 0x48c60b
jg 0x48c566
cmp eax, esi
jb 0x48c60b
mov ebx, dword [ebp - 0x1014]
mov eax, dword [ebp - 0x101c]
cmp ebx, esi
jg 0x48c60b
jl 0x48c588
cmp dword [ebp - 0x1008], eax
ja 0x48c60b
lea edi, [ebp - 0x1004]
xorps xmm0, xmm0
add edi, eax
movlpd qword [ebp - 0x1018], xmm0
lea ecx, [ebp - 0x1004]
cmp dword [ebp - 0x1008], esi
jne 0x48c5ad
cmp ebx, esi
je 0x48c5f2
mov edx, dword [ebp - 0x1014]
mov esi, dword [ebp - 0x1018]
cmp ecx, edi
jae 0x48c5f2
mov al, byte [ecx]
cmp al, 0xd
jne 0x48c5d3
lea eax, [edi - 1]
cmp ecx, eax
jae 0x48c5df
cmp byte [ecx + 1], 0xa
jne 0x48c5df
inc ecx
jmp 0x48c5df
movzx eax, al
movsx eax, byte [eax + 0x4a4c60]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x48c5b9
cmp edx, ebx
jne 0x48c5b9
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x1020]
jmp 0x48c610
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.004781c4
leave
ret
Function at 0x48ca1e
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x48cabb
push ebx
push esi
call fcn.0048cabe
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.00485573
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x48ca68
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x48caba
push edi
push eax
call fcn.00485460
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x48ca88
call fcn.00485410
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x48cab9
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.00485573
add esp, 0x20
test eax, eax
jne 0x48caa7
push edi
call fcn.00485410
jmp 0x48caaf
push ebx
call fcn.00485410
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret
Function at 0x48e002
Capabilities:
Get file size

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
sub esp, 0x18
mov eax, dword [eax + 0xc]
nop
shr eax, 3
test al, 1
je 0x48e01c
mov al, 1
leave
ret
mov eax, dword [ebp + 8]
push ebx
push esi
mov eax, dword [eax + 0xc]
nop
test al, 0xc0
mov eax, dword [ebp + 8]
je 0x48e033
mov ecx, dword [eax]
cmp ecx, dword [eax + 4]
je 0x48e08b
mov eax, dword [eax + 0x10]
nop
push eax
call fcn.0048caf5
mov esi, eax
pop ecx
cmp esi, 0xffffffff
je 0x48e08b
xor ebx, ebx
lea eax, [ebp - 0x10]
inc ebx
xorps xmm0, xmm0
push ebx
push eax
movlpd qword [ebp - 8], xmm0
push dword [ebp - 4]
push dword [ebp - 8]
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x48e08b
lea eax, [ebp - 0x18]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x48e08b
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x18]
jne 0x48e085
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x14]
je 0x48e087
xor bl, bl
mov al, bl
jmp 0x48e08d
xor al, al
pop esi
pop ebx
leave
ret
Function at 0x492fe4
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov edx, dword [ebp + 8]
mov ecx, edx
push ebx
mov ebx, dword [ebp + 0xc]
mov eax, edx
sar ecx, 6
and eax, 0x3f
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x4a5e40]
mov dword [ebp - 0x18], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x493026
cmp byte [ebx], 0xa
jne 0x493026
or byte [edi + eax + 0x28], 4
jmp 0x49302b
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x49312e
mov cl, byte [eax]
cmp cl, 0x1a
je 0x493109
lea ebx, [eax + 1]
mov dword [ebp - 8], ebx
mov ebx, dword [ebp + 0xc]
cmp cl, 0xd
je 0x49305a
mov eax, dword [ebp - 8]
jmp 0x49307a
mov edx, dword [ebp - 0x10]
cmp dword [ebp - 8], edx
mov edx, dword [ebp + 8]
jae 0x493096
mov ebx, dword [ebp - 8]
cmp byte [ebx], 0xa
jne 0x493074
add eax, 2
mov cl, 0xa
jmp 0x493077
mov eax, dword [ebp - 8]
mov ebx, dword [ebp + 0xc]
mov byte [esi], cl
mov dword [ebp - 0xc], 1
mov dword [ebp - 8], esi
mov esi, dword [ebp - 0xc]
add esi, dword [ebp - 8]
cmp eax, dword [ebp - 0x10]
jb 0x49303c
jmp 0x49312e
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x493104
cmp dword [ebp - 0x10], 0
je 0x493104
mov edx, dword [ebp - 0x18]
mov eax, dword [edx*4 + 0x4a5e40]
test byte [eax + edi + 0x28], 0x48
je 0x4930e3
mov cl, byte [ebp - 1]
cmp cl, 0xa
jne 0x4930d3
mov byte [esi], 0xa
jmp 0x49312d
mov byte [esi], 0xd
mov eax, dword [edx*4 + 0x4a5e40]
mov byte [eax + edi + 0x2a], cl
jmp 0x49312d
cmp byte [ebp - 1], 0xa
jne 0x4930ed
cmp esi, ebx
je 0x4930ce
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0048c18b
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x49312e
mov byte [esi], 0xd
jmp 0x49312d
mov eax, edx
and edx, 0x3f
sar eax, 6
imul edx, edx, 0x38
mov edi, dword [eax*4 + 0x4a5e40]
mov al, byte [edi + edx + 0x28]
test al, 0x40
jne 0x49312b
or al, 2
mov byte [edi + edx + 0x28], al
jmp 0x49312e
mov byte [esi], cl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x493137
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 8]
and eax, 0x3f
push ebx
mov ebx, dword [ebp + 0xc]
sar edx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [edx*4 + 0x4a5e40]
mov dword [ebp - 8], edx
mov edx, dword [eax + edi + 0x18]
mov dword [ebp - 0x18], edx
mov edx, dword [ebp + 0x10]
test edx, edx
je 0x49317b
push 0xa
pop esi
cmp word [ebx], si
jne 0x49317b
or byte [eax + edi + 0x28], 4
jmp 0x493180
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + edx*2]
mov eax, ebx
mov dword [ebp - 0x10], edx
mov esi, ebx
cmp ebx, edx
jae 0x4932eb
movzx edx, word [eax]
mov ecx, edx
mov dword [ebp - 0xc], ecx
movzx ecx, cx
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 8]
cmp edx, 0x1a
je 0x4932c3
lea ebx, [eax + 2]
mov dword [ebp - 4], ebx
push 0xd
pop ebx
cmp dx, bx
mov ebx, dword [ebp + 0xc]
je 0x4931cd
mov ebx, dword [ebp - 0x14]
mov edx, esi
mov eax, dword [ebp - 4]
movzx ebx, bx
mov dword [ebp - 4], ebx
jmp 0x4931f7
mov edx, dword [ebp - 4]
cmp edx, dword [ebp - 0x10]
jae 0x493216
push 0xa
pop ebx
cmp word [edx], bx
jne 0x4931e4
push ebx
add eax, 4
pop edx
jmp 0x4931ec
mov eax, edx
mov edx, dword [ebp - 0xc]
movzx edx, dx
movzx edx, dx
mov dword [ebp - 4], edx
mov edx, esi
mov dword [ebp - 0x14], esi
mov ecx, dword [ebp - 4]
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0xc], 2
mov word [esi], cx
mov esi, dword [ebp - 0xc]
add esi, edx
cmp eax, dword [ebp - 0x10]
jb 0x493192
jmp 0x4932eb
push 0
lea eax, [ebp - 0x14]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4932be
cmp dword [ebp - 0x14], 0
je 0x4932be
mov eax, dword [ebp - 8]
push 0xa
mov eax, dword [eax*4 + 0x4a5e40]
test byte [eax + edi + 0x28], 0x48
pop eax
je 0x49329a
mov dx, word [ebp - 4]
cmp dx, ax
jne 0x493262
mov word [esi], ax
jmp 0x4932e8
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebp - 8]
movzx ecx, dx
shr ecx, 8
push 0xa
mov eax, dword [eax*4 + 0x4a5e40]
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x4a5e40]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x4a5e40]
pop ecx
mov byte [eax + edi + 0x2c], cl
jmp 0x4932e8
cmp word [ebp - 4], ax
jne 0x4932a4
cmp esi, ebx
je 0x49325a
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.0048c18b
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x4932eb
push 0xd
pop eax
jmp 0x49325a
mov eax, ecx
and ecx, 0x3f
sar eax, 6
imul ecx, ecx, 0x38
mov edi, dword [eax*4 + 0x4a5e40]
mov al, byte [edi + ecx + 0x28]
test al, 0x40
jne 0x4932e5
or al, 2
mov byte [edi + ecx + 0x28], al
jmp 0x4932eb
mov word [esi], dx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x433000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
mov eax, section..text
nop
nop
mov ebx, 0x40de38
nop
mov ecx, 0x6caa1130
test eax, eax
nop
nop
nop
nop
je 0x43304e
nop
nop
nop
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
inc eax
nop
cmp eax, ebx
nop
nop
nop
nop
jne 0x433024
nop
nop
nop
nop
mov eax, section..data
nop
mov ebx, 0x4304d8
nop
nop
mov ecx, 0x6051071c
nop
test eax, eax
nop
nop
nop
nop
je 0x433084
nop
nop
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
add eax, 4
nop
nop
nop
cmp eax, ebx
nop
nop
nop
jne 0x43306c
nop
nop
nop
nop
nop
nop
nop
nop
nop
popal
jmp 0x431219
Function at 0x433002
Capabilities:
Check for software breakpoints
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
mov eax, section..text
push 4
nop
nop
nop
nop
nop
nop
nop
pop edi
nop
nop
nop
nop
cmp eax, 0
nop
nop
nop
je 0x433072
nop
nop
nop
mov ebx, 0x40de38
nop
nop
nop
nop
mov ecx, ebx
nop
nop
sub ecx, eax
nop
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
push eax
nop
nop
nop
mov eax, ecx
nop
nop
nop
nop
nop
div edi
nop
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
nop
nop
pop eax
nop
nop
nop
mov esi, 0x5a9e494d
nop
nop
nop
xor dword [eax], esi
nop
nop
nop
nop
nop
add eax, edi
nop
nop
nop
loop 0x433060
nop
mov eax, section..data
nop
nop
nop
nop
cmp eax, 0
nop
je 0x4330d2
nop
nop
nop
mov ebx, 0x4304d8
nop
mov ecx, ebx
nop
nop
nop
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
push eax
nop
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
div edi
nop
nop
nop
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
pop eax
nop
nop
nop
nop
mov esi, 0x172b4ed2
nop
xor dword [eax], esi
nop
nop
nop
nop
nop
nop
add eax, edi
nop
nop
nop
loop 0x4330c0
nop
nop
nop
nop
nop
popal
nop
nop
jmp 0x431219
Function at 0x401960
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x41130b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20c
push ebx
push esi
mov ebx, ecx
push edi
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x12]
mov word [esp + 0x10], 0
rep stosd dword es:[edi], eax
lea ecx, [esp + 0xc]
stosw word es:[edi], ax
call sub.MFC42u.DLL_CString::CString_3
lea eax, [esp + 0x10]
push 0x104
push eax
push 0
mov dword [esp + 0x22c], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esp + 0x10]
call sub.MFC42u.DLL_CString::operator_2
lea ecx, [esp + 0xc]
call sub.MFC42u.DLL_CString::MakeLower
push str.khsimulator.exe
lea ecx, [esp + 0x10]
call sub.MFC42u.DLL_CString::Find
or edi, 0xffffffff
cmp eax, edi
je 0x401a37
push str.HPara.dat
push str.khsimulator.exe
lea ecx, [esp + 0x14]
call sub.MFC42u.DLL_CString::Replace
mov edx, dword [esp + 0xc]
push 0x41a144
push edx
call dword [sym.imp.MSVCRT.dll__wfopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x401a37
push esi
push 0x10
add ebx, 0xa84
push 1
push ebx
call dword [sym.imp.MSVCRT.dll_fread]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
lea ecx, [esp + 0xc]
mov dword [esp + 0x220], edi
call sub.MFC42u.DLL_CString::CString
mov ecx, dword [esp + 0x218]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x218
ret
Function at 0x404540
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4118eb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20c
push esi
mov esi, ecx
push edi
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0xe]
mov word [esp + 0xc], 0
rep stosd dword es:[edi], eax
lea ecx, [esp + 8]
stosw word es:[edi], ax
call sub.MFC42u.DLL_CString::CString_3
lea eax, [esp + 0xc]
push 0x104
push eax
push 0
mov dword [esp + 0x228], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 0xc]
push ecx
lea ecx, [esp + 0xc]
call sub.MFC42u.DLL_CString::operator_2
lea ecx, [esp + 8]
call sub.MFC42u.DLL_CString::MakeLower
push str.khsimulator.exe
lea ecx, [esp + 0xc]
call sub.MFC42u.DLL_CString::Find
cmp eax, 0xffffffff
jne 0x4045d8
mov dword [esi + 0x1a9c], 5
jmp 0x40463d
push str.HPara.dat
push str.khsimulator.exe
lea ecx, [esp + 0x10]
call sub.MFC42u.DLL_CString::Replace
mov edx, dword [esp + 8]
push 0x41a144
push edx
call dword [sym.imp.MSVCRT.dll__wfopen]
mov edi, eax
add esp, 8
test edi, edi
jne 0x404617
mov ecx, esi
call fcn.00404830
mov dword [esi + 0x4cd8], 1
jmp 0x40463d
push edi
push 0x10
lea eax, [esi + 0x1cac]
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fread]
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
mov dword [esi + 0x4cd8], 0
lea ecx, [esp + 8]
mov dword [esp + 0x21c], 0xffffffff
call sub.MFC42u.DLL_CString::CString
mov ecx, dword [esp + 0x214]
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x218
ret
Function at 0x404830
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4119bb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x214
push ebx
push ebp
xor eax, eax
push esi
mov ebp, ecx
push edi
mov word [esp + 0x15], ax
xor ebx, ebx
mov ecx, 0x81
lea edi, [esp + 0x1e]
mov byte [esp + 0x17], al
mov word [esp + 0x1c], bx
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x10]
stosw word es:[edi], ax
call sub.MFC42u.DLL_CString::CString_3
push 1
push 0x104
mov dword [esp + 0x234], ebx
call dword [sym.imp.MSVCRT.dll_calloc]
mov edi, dword [sym.imp.MSVCRT.dll_atoi]
mov esi, str.255.255.255.255
push esi
call edi
add esp, 0xc
mov byte [esp + 0x14], al
mov al, byte [esi]
cmp al, 0x2e
je 0x4048b4
test al, al
je 0x4048b4
mov al, byte [esi + 1]
inc esi
cmp al, 0x2e
jne 0x4048a8
inc esi
push esi
call edi
add esp, 4
mov byte [esp + ebx + 0x15], al
inc ebx
cmp ebx, 3
jl 0x4048a2
mov ecx, dword [esp + 0x17]
mov edx, dword [esp + 0x16]
mov eax, dword [esp + 0x15]
and ecx, 0xff
shl ecx, 8
and edx, 0xff
and eax, 0xff
add ecx, edx
mov edx, dword [esp + 0x14]
shl ecx, 8
add ecx, eax
and edx, 0xff
shl ecx, 8
add ecx, edx
push str.21845
mov dword [ebp + 0x1cb0], ecx
call edi
push 0x41a2a0
mov word [ebp + 0x1cb4], ax
call edi
push str.115200
mov word [ebp + 0x1cb6], ax
call edi
add esp, 0xc
mov dword [ebp + 0x1cb8], eax
lea eax, [esp + 0x1c]
lea esi, [ebp + 0x1cac]
push 0x104
push eax
push 0
mov dword [esi], 1
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x14]
call sub.MFC42u.DLL_CString::operator_2
lea ecx, [esp + 0x10]
call sub.MFC42u.DLL_CString::MakeLower
push str.khsimulator.exe
lea ecx, [esp + 0x14]
call sub.MFC42u.DLL_CString::Find
or ebx, 0xffffffff
cmp eax, ebx
je 0x4049c0
push str.HPara.dat
push str.khsimulator.exe
lea ecx, [esp + 0x18]
call sub.MFC42u.DLL_CString::Replace
mov edx, dword [esp + 0x10]
push 0x41a0f8
push edx
call dword [sym.imp.MSVCRT.dll__wfopen]
mov edi, eax
add esp, 8
test edi, edi
je 0x4049c0
push edi
push 0x10
push 1
push esi
call dword [sym.imp.MSVCRT.dll_fwrite]
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
lea ecx, [esp + 0x10]
mov dword [esp + 0x22c], ebx
call sub.MFC42u.DLL_CString::CString
mov ecx, dword [esp + 0x224]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x220
ret
Function at 0x405520
Capabilities:
Write file on windows

Disassembly:
push ecx
mov eax, dword [esp + 0xc]
push esi
push edi
mov esi, ecx
push eax
push 1
mov edi, dword [esi + 0x1a90]
mov dword [esp + 0x10], 0
call fcn.00405990
cmp dword [esi + 0x1a9c], 6
je 0x40558c
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
lea ecx, [esp + 8]
push 0
push ecx
push edx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40558c
mov edx, dword [0x41a980]
mov ecx, dword [0x41a918]
push 0x10
push str.KHSimulator_Message
mov eax, dword [edx + 0x20]
push ecx
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
mov dword [esi + 0x1a9c], 1
pop edi
pop esi
pop ecx
ret 0xc

Function at 0x4055a0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x808
push ebp
push esi
mov ebp, ecx
push edi
mov ecx, 0x1ff
xor eax, eax
lea edi, [esp + 0x15]
mov byte [esp + 0x14], 0
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x818]
mov dword [esp + 0xc], 0
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [ebp + 0x1a90]
push ecx
push 0
mov ecx, ebp
mov dword [esp + 0x18], eax
call fcn.00405990
cmp dword [ebp + 0x1a9c], 6
je 0x4056dc
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0xc]
push 0
push edx
lea eax, [esp + 0x1c]
push 0x14
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x405642
mov eax, dword [esp + 0xc]
test eax, eax
je 0x405675
mov edi, eax
jle 0x405630
xor esi, esi
test eax, eax
jle 0x405630
mov dl, byte [esp + esi + 0x14]
mov ecx, ebp
push edx
call fcn.004056f0
inc esi
cmp esi, edi
jl 0x40561f
mov eax, dword [ebp + 0x1aa4]
cmp eax, 0xb
je 0x40568b
cmp eax, 0xc
je 0x4056ab
jmp 0x4055f0
mov ecx, dword [0x41a980]
mov eax, dword [0x41a91c]
push 0x10
push str.KHSimulator_Message
mov edx, dword [ecx + 0x20]
push eax
push edx
call dword [sym.imp.USER32.dll_MessageBoxW]
pop edi
mov dword [ebp + 0x1a9c], 1
pop esi
pop ebp
add esp, 0x808
ret 4
pop edi
mov dword [ebp + 0x1a9c], 2
pop esi
pop ebp
add esp, 0x808
ret 4
pop edi
mov dword [ebp + 0x1aa4], 0x5a
mov dword [ebp + 0x1a9c], 0
pop esi
pop ebp
add esp, 0x808
ret 4
mov dword [ebp + 0x1aa4], 0x5a
mov dword [ebp + 0x1a9c], 4
mov ecx, dword [0x41a980]
mov eax, dword [0x41a928]
push 0x10
push str.KHSimulator_Message
mov edx, dword [ecx + 0x20]
push eax
push edx
call dword [sym.imp.USER32.dll_MessageBoxW]
pop edi
pop esi
pop ebp
add esp, 0x808
ret 4