joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40b4da
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x41fef8]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x40b520
cmp word [ebx], dx
jne 0x40b520
or byte [eax + edi + 0x28], 4
jmp 0x40b525
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x40b688
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x40b668
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x40b566
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x40b59c
cmp eax, edx
jae 0x40b5aa
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x40b541
jmp 0x40b688
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40b663
cmp dword [ebp - 0x18], 0
je 0x40b663
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x41fef8]
test byte [eax + edi + 0x28], 0x48
je 0x40b639
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x40b5fd
mov word [esi], cx
jmp 0x40b634
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x41fef8]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x41fef8]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x41fef8]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x40b688
pop eax
cmp word [ebp - 4], ax
jne 0x40b649
cmp esi, ebx
jne 0x40b649
mov word [esi], ax
jmp 0x40b685
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.0040ad06
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x40b688
push 0xd
pop eax
jmp 0x40b644
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x41fef8]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x40b682
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x40b688
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x40e2ad
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 0x40e34a
push ebx
push esi
call fcn.0040e276
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.0040e20a
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x40e2f7
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x40e349
push edi
push eax
call fcn.0040cdd7
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x40e317
call fcn.0040c57f
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x40e348
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.0040e20a
add esp, 0x20
test eax, eax
jne 0x40e336
push edi
call fcn.0040c57f
jmp 0x40e33e
push ebx
call fcn.0040c57f
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 0x40f35b
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x419ee0
push 0x419ed8
push str.FlsAlloc
push 0x1f
call fcn.0040f277
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40f38f
push dword [ebp + 8]
mov ecx, esi
call dword [0x415130]
call esi
jmp 0x40f395
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x40f3d9
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x419ef0
push 0x419ee8
push str.FlsGetValue
push 0x21
call fcn.0040f277
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40f410
push dword [ebp + 8]
mov ecx, esi
call dword [0x415130]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x40f418
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x419ef8
push 0x419ef0
push str.FlsSetValue
push 0x22
call fcn.0040f277
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40f452
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x415130]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x411e55
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
push dword [ebp + 0xc]
push ebx
call fcn.00411dd1
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x411fc4
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x411fc4
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x411f79
jg 0x411eb1
test eax, eax
je 0x411f6f
push 1
push 0x1000
call fcn.0040beff
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x411ed4
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x411f66
push 0x8000
push ebx
call fcn.00409c66
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x411efd
jg 0x411ef8
cmp ecx, 0x1000
jb 0x411efd
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.0041135f
add esp, 0x10
cmp eax, 0xffffffff
je 0x411f42
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x411ef8
jl 0x411f29
test ecx, ecx
jne 0x411eea
push dword [ebp - 0xc]
push ebx
call fcn.00409c66
push esi
call fcn.0040c57f
add esp, 0xc
xor ebx, ebx
jmp 0x411fd2
cmp byte [edi + 0x24], 0
je 0x411f59
cmp dword [edi + 0x20], 5
jne 0x411f59
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x411f64
mov ebx, dword [edi + 0x18]
jmp 0x411f66
xor ebx, ebx
push esi
call fcn.0040c57f
pop ecx
jmp 0x411fd2
test ecx, ecx
jg 0x411f3b
jl 0x411f79
test eax, eax
jae 0x411f3b
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0040ad06
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x411f99
cmp byte [edi + 0x1c], 0
je 0x411f3b
jmp 0x411fca
push ebx
call fcn.0040e803
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x411f3b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [edi + 0x24], 1
mov dword [edi + 0x20], eax
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x411fd2
cmp byte [edi + 0x1c], 0
je 0x411fcf
mov ebx, dword [edi + 0x18]
jmp 0x411fd2
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.0040ad06
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x413fe0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x41400d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x41400d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret

Function at 0x4eccdf
Capabilities:
Encode data using xor

Disassembly:
mov ecx, 0x4eca52
inc edx
sub edx, 0x7c160b9e
sub edx, 0xa88d58b0
call fcn.004ecd1b
mov edx, esi
or edx, esi
dec edx
xor dword [eax], ecx
or edx, edx
sub esi, 1
add eax, 1
or edx, esi
inc edx
sub edx, edx
cmp eax, ebx
jl fcn.004eccdf
or edx, edx
add edx, esi
ret
Function at 0x40f180
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x40f1ad
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40f1ad
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret

Function at 0x503b8c
Capabilities:
Accept command line arguments
Hide graphical window

Disassembly:
mov ecx, ebp
push ebp
mov ebp, esp
mov dword [0x505076], ecx
call dword [sym.imp.kernel32.dll_GetCommandLineA]
mov dword [0x505298], eax
mov dword [0x505220], 0x503376
mov dword [0x50521c], 2
jmp 0x503bbc
mov dword [0x505224], 0
mov dword [0x505228], 0
mov dword [0x505218], 0x30
push 0
call dword [sym.imp.kernel32.dll_GetModuleHandleA]
mov dword [0x50522c], eax
mov dword [0x505240], 0x50408c
mov dword [0x505238], 0xf
mov dword [0x50506e], eax
push 0x7f00
push 0
call dword [sym.imp.user32.dll_LoadIconA]
mov dword [0x505230], eax
mov dword [0x505244], eax
push 0x7f00
push 0
call dword [sym.imp.user32.dll_LoadCursorA]
mov dword [0x505234], eax
push 0x505218
call dword [sym.imp.user32.dll_RegisterClassExA]
push 0
push dword [0x50506e]
push 0
push 0
push 0x1e5
push 0x21e
push 0xffffe52a
push 0xfffff588
push 0x40000
push str.wait
push str.aroka
push 0
call dword [sym.imp.user32.dll_CreateWindowExA]
mov dword [0x505290], eax
push 5
push dword [0x505290]
call dword [sym.imp.user32.dll_ShowWindow]
push dword [0x505290]
call dword [sym.imp.user32.dll_UpdateWindow]
jmp 0x503c8f
push 0
push 0
push 0
push 0x505248
call dword [sym.imp.user32.dll_GetMessageA]
or eax, eax
je 0x503cbc
push 0x505248
call dword [sym.imp.user32.dll_TranslateMessage]
push 0x505248
call dword [sym.imp.user32.dll_DispatchMessageA]
jmp 0x503c8f
mov eax, dword [0x505250]
jmp 0x503cc9
call 0x502c0d
ret
Function at 0x402f10
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 + 0x18b0]
mov dword [esp + 0x10], 0
call fcn.00403380
cmp dword [esi + 0x18bc], 6
je 0x402f7c
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 0x402f7c
mov edx, dword [0x41682c]
mov ecx, dword [0x4167d0]
push 0x10
push str.EVSimulator_Message
mov eax, dword [edx + 0x20]
push ecx
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
mov dword [esi + 0x18bc], 1
pop edi
pop esi
pop ecx
ret 0xc

Function at 0x402f90
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 + 0x18b0]
push ecx
push 0
mov ecx, ebp
mov dword [esp + 0x18], eax
call fcn.00403380
cmp dword [ebp + 0x18bc], 6
je 0x4030cc
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 0x403032
mov eax, dword [esp + 0xc]
test eax, eax
je 0x403065
mov edi, eax
jle 0x403020
xor esi, esi
test eax, eax
jle 0x403020
mov dl, byte [esp + esi + 0x14]
mov ecx, ebp
push edx
call fcn.004030e0
inc esi
cmp esi, edi
jl 0x40300f
mov eax, dword [ebp + 0x18c4]
cmp eax, 0xb
je 0x40307b
cmp eax, 0xc
je 0x40309b
jmp 0x402fe0
mov ecx, dword [0x41682c]
mov eax, dword [0x4167d4]
push 0x10
push str.EVSimulator_Message
mov edx, dword [ecx + 0x20]
push eax
push edx
call dword [sym.imp.USER32.dll_MessageBoxW]
pop edi
mov dword [ebp + 0x18bc], 1
pop esi
pop ebp
add esp, 0x808
ret 4
pop edi
mov dword [ebp + 0x18bc], 2
pop esi
pop ebp
add esp, 0x808
ret 4
pop edi
mov dword [ebp + 0x18c4], 0x5a
mov dword [ebp + 0x18bc], 0
pop esi
pop ebp
add esp, 0x808
ret 4
mov dword [ebp + 0x18c4], 0x5a
mov dword [ebp + 0x18bc], 4
mov ecx, dword [0x41682c]
mov eax, dword [0x4167e0]
push 0x10
push str.EVSimulator_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
Function at 0x403480
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
mov eax, 0x155c
call fcn.0040d6c0
push ebx
push esi
mov esi, dword [esp + 0x1568]
mov ebx, ecx
push edi
mov ecx, 0x514
xor eax, eax
lea edi, [esp + 0x118]
rep stosd dword es:[edi], eax
mov eax, 0x431bde83
mov ecx, dword [ebx + 0x188c]
mul esi
shr edx, 0x12
mov dword [esp + 0xc], edx
mov eax, esi
xor edx, edx
mov esi, 0xf4240
div esi
lea eax, [esp + 0xc]
mov dword [esp + 0x18], ecx
push eax
push 0
push 0
inc ecx
mov dword [esp + 0x20], 1
mov dword [esp + 0x1c], edx
lea edx, [esp + 0x20]
push edx
push ecx
call sub.WS2_32.dll_select
test eax, eax
jge 0x403521
mov ecx, dword [0x41682c]
mov eax, dword [0x4167d8]
push 0x10
push str.EVSimulator_Message
mov edx, dword [ecx + 0x20]
push eax
push edx
call dword [sym.imp.USER32.dll_MessageBoxW]
pop edi
mov dword [ebx + 0x18bc], 3
pop esi
pop ebx
add esp, 0x155c
ret 4
je 0x40364e
mov ecx, dword [ebx + 0x188c]
lea eax, [esp + 0x14]
push eax
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x40364e
mov eax, dword [ebx + 0x188c]
push 0
push 0
push 0
lea edx, [esp + 0x124]
push 0x1450
push edx
push eax
call sub.WS2_32.dll_recvfrom
cmp eax, 0xffffffff
jne 0x403573
mov ecx, dword [0x4167d4]
push 0x10
push str.EVSimulator_Message
jmp 0x403584
test eax, eax
jne 0x4035ab
mov ecx, dword [0x4167dc]
push 0x10
push str.EVSimulator_Message
mov edx, dword [0x41682c]
push ecx
mov eax, dword [edx + 0x20]
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
pop edi
mov dword [ebx + 0x18bc], 1
pop esi
pop ebx
add esp, 0x155c
ret 4
jle 0x4035ca
mov ecx, eax
lea edi, [ebx + 0x3074]
mov edx, ecx
lea esi, [esp + 0x118]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [ebx + 0x3076]
mov ecx, ebx
push eax
call fcn.00403b40
mov esi, eax
test si, si
jne 0x4035e4
mov esi, 1
lea ecx, [esi - 1]
lea edx, [ebx + 0x3074]
push ecx
push edx
mov ecx, ebx
call fcn.00403ae0
and esi, 0xffff
cmp al, byte [esi + ebx + 0x3073]
je 0x403638
mov ecx, dword [0x41682c]
mov eax, dword [0x4167e0]
push 0x10
push str.EVSimulator_Message
mov edx, dword [ecx + 0x20]
push eax
push edx
call dword [sym.imp.USER32.dll_MessageBoxW]
pop edi
mov dword [ebx + 0x18bc], 4
pop esi
pop ebx
add esp, 0x155c
ret 4
pop edi
mov dword [ebx + 0x18bc], 0
pop esi
pop ebx
add esp, 0x155c
ret 4
pop edi
mov dword [ebx + 0x18bc], 2
pop esi
pop ebx
add esp, 0x155c
ret 4
Function at 0x4038c0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x18
push ebx
push esi
xor eax, eax
push edi
xor edi, edi
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
push edi
push edi
mov dword [esp + 0x24], eax
push 1
mov esi, ecx
push edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], edi
mov dword [esp + 0x30], eax
call dword [sym.imp.KERNEL32.dll_CreateEventA]
cmp eax, edi
mov dword [esp + 0x20], eax
jne 0x403911
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x18bc], 1
pop edi
pop esi
pop ebx
add esp, 0x18
ret 4
mov eax, dword [esi + 0x18b4]
lea ecx, [esp + 0x10]
lea edx, [esp + 0xc]
push ecx
lea ebx, [esi + 0x3074]
push edx
push 0x1f4
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x403a39
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x403950
mov ecx, dword [esp + 0x20]
push ecx
jmp 0x4038f8
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x20]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, edi
je 0x40398d
cmp eax, 0x102
jne 0x403a39
mov ecx, dword [esp + 0x20]
mov dword [esi + 0x18bc], 2
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
add esp, 0x18
ret 4
mov ecx, dword [esi + 0x18b4]
lea edx, [esp + 0xc]
push 1
lea eax, [esp + 0x14]
push edx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x4039b4
mov edx, dword [esp + 0x20]
push edx
jmp 0x4038f8
lea eax, [esi + 0x3076]
mov ecx, esi
push eax
call fcn.00403b40
mov edi, eax
test di, di
jne 0x4039ce
mov edi, 1
lea ecx, [edi - 1]
push ecx
push ebx
mov ecx, esi
call fcn.00403ae0
and edi, 0xffff
cmp al, byte [edi + esi + 0x3073]
je 0x403a24
mov eax, dword [0x41682c]
mov edx, dword [0x4167e0]
push 0x10
push str.EVSimulator_Message
mov ecx, dword [eax + 0x20]
push edx
push ecx
call dword [sym.imp.USER32.dll_MessageBoxW]
mov edx, dword [esp + 0x20]
mov dword [esi + 0x18bc], 4
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
add esp, 0x18
ret 4
mov edx, dword [esp + 0x20]
mov dword [esi + 0x18bc], 0
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
add esp, 0x18
ret 4

Function at 0x403a50
Capabilities:
Read file on windows
Terminate process

Disassembly:
push ebx
mov ebx, ecx
push ebp
push esi
mov esi, dword [ebx + 0x18ec]
push edi
push 1
push esi
xor ebp, ebp
call dword [sym.imp.MSVCRT.dll_calloc]
add esp, 8
mov edi, eax
test edi, edi
push ebp
jne 0x403a82
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
push 1
call dword [sym.imp.MSVCRT.dll_exit]
mov eax, dword [ebx + 0x18e0]
mov ebx, dword [esp + 0x18]
push eax
push ebx
call dword [sym.imp.MSVCRT.dll_fseek]
push ebx
push esi
push 1
push edi
call dword [sym.imp.MSVCRT.dll_fread]
mov al, byte [ebx + 0xc]
add esp, 0x1c
test al, 0x20
je 0x403aad
xor ebp, ebp
jmp 0x403abf
xor eax, eax
test esi, esi
jle 0x403abf
xor ecx, ecx
mov cl, byte [eax + edi]
add ebp, ecx
inc eax
cmp eax, esi
jl 0x403ab3
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
push 0
call dword [sym.imp.MSVCRT.dll_free]
add esp, 8
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
ret 4
Function at 0x405010
Capabilities:
Read file on windows
Terminate process

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
mov esi, ecx
push 1
push 0x104
mov dword [esp + 0x14], esi
call dword [sym.imp.MSVCRT.dll_calloc]
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x405044
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
push 1
call dword [sym.imp.MSVCRT.dll_exit]
mov ecx, esi
call fcn.004051c0
mov ebp, eax
test ebp, ebp
jne 0x40506e
push eax
mov dword [esi + 0x18bc], 7
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 4
mov eax, dword [esp + 0x1c]
push edi
mov edi, dword [sym.imp.MSVCRT.dll_fseek]
push 0
push eax
push ebp
call edi
push ebp
push 0xc
push 1
push ebx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x1c
mov ecx, esi
push ebx
call fcn.00403b10
lea ecx, [ebx + 4]
mov dword [esp + 0x20], eax
push ecx
mov ecx, esi
call fcn.00403b10
lea edx, [ebx + 8]
mov ecx, esi
push edx
mov dword [esp + 0x18], eax
call fcn.00403b10
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x20]
push 0
push eax
push ebp
call edi
push ebp
push 0x8c
push 1
push ebx
call dword [sym.imp.MSVCRT.dll_fread]
lea edi, [esi + 0x1a40]
mov ecx, 0x23
mov esi, ebx
push 0
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x30]
mov ecx, dword [edi + 0x1a44]
push ecx
push ebp
call dword [sym.imp.MSVCRT.dll_fseek]
xor edx, edx
push ebp
mov dx, word [edi + 0x1a42]
push edx
push 1
push ebx
call dword [sym.imp.MSVCRT.dll_fread]
xor ecx, ecx
mov esi, ebx
mov cx, word [edi + 0x1a42]
add edi, 0x47f8
mov eax, ecx
push 0
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x50]
mov esi, dword [sym.imp.MSVCRT.dll_fseek]
push ecx
push ebp
call esi
mov edi, dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x44
push ebp
push 0x10
push 1
push ebx
call edi
mov edx, dword [esp + 0x20]
mov eax, ebx
add edx, 0x1acc
mov ecx, dword [eax]
mov dword [edx], ecx
mov ecx, dword [eax + 4]
push 0
mov dword [edx + 4], ecx
mov ecx, dword [eax + 8]
mov dword [edx + 8], ecx
mov ecx, dword [esp + 0x2c]
mov eax, dword [eax + 0xc]
push ecx
push ebp
mov dword [edx + 0xc], eax
call esi
push ebp
push 0xc
push 1
push ebx
call edi
mov edx, dword [esp + 0x3c]
mov eax, dword [ebx]
add edx, 0x1adc
push ebp
mov dword [edx], eax
mov ecx, dword [ebx + 4]
mov dword [edx + 4], ecx
mov eax, dword [ebx + 8]
mov dword [edx + 8], eax
call dword [sym.imp.MSVCRT.dll_fclose]
push 0
call dword [sym.imp.MSVCRT.dll_free]
add esp, 0x34
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 4
Function at 0x405540
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x208
push ebx
push esi
mov ebx, ecx
push edi
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0xe]
mov word [esp + 0xc], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0xc]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 0xc]
lea esi, [ebx + 0x49c0]
push ecx
mov ecx, esi
call fcn.0040d164
mov ecx, esi
call sub.MFC42u.DLL_CString::MakeLower
push str.evsimulator.exe
mov ecx, esi
call sub.MFC42u.DLL_CString::Find
cmp eax, 0xffffffff
je 0x4055e8
push str.TempComm.dat
push str.evsimulator.exe
mov ecx, esi
call sub.MFC42u.DLL_CString::Replace
mov esi, dword [esi]
push 0x416174
push esi
call dword [sym.imp.MSVCRT.dll__wfopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x4055e8
push esi
push 0x10
add ebx, 0x1acc
push 1
push ebx
call dword [sym.imp.MSVCRT.dll_fwrite]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
pop edi
pop esi
pop ebx
add esp, 0x208
ret
Function at 0x4056b0
Capabilities:
Delete directory
Delete file

Disassembly:
push 0xffffffffffffffff
push 0x40e149
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x24c
push ebx
push ebp
push esi
push edi
mov edi, ecx
xor ebx, ebx
lea ecx, [esp + 0x20]
mov dword [esp + 0x264], ebx
call fcn.0040d1e8
lea eax, [esp + 0x26c]
push str..
lea ecx, [esp + 0x18]
push eax
push ecx
mov byte [esp + 0x270], 1
call sub.MFC42u.DLL_operator
mov edx, dword [esp + 0x14]
push ebx
push edx
lea ecx, [esp + 0x28]
mov byte [esp + 0x26c], 2
call sub.MFC42u.DLL_CFileFind::FindFile
cmp eax, ebx
je 0x4057f6
mov ebp, dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [esp + 0x20]
call sub.MFC42u.DLL_CFileFind::FindNextFileW
lea ecx, [esp + 0x20]
mov dword [esp + 0x18], eax
call sub.MFC42u.DLL_CFileFind::IsDots
test eax, eax
jne 0x4057ec
mov eax, dword [esp + 0x20]
push 0x10
lea ecx, [esp + 0x24]
call dword [eax + 0x40]
cmp eax, ebx
je 0x40578d
push ecx
mov ecx, esp
mov dword [esp + 0x40], esp
push ecx
lea ecx, [esp + 0x28]
call sub.MFC42u.DLL_CFileFind::GetFilePath
mov ecx, edi
call fcn.004056b0
lea edx, [esp + 0x1c]
lea ecx, [esp + 0x20]
push edx
call sub.MFC42u.DLL_CFileFind::GetFilePath
mov eax, dword [eax]
push eax
call ebp
lea ecx, [esp + 0x1c]
jmp 0x4057e7
lea eax, [esp + 0x10]
lea ecx, [esp + 0x20]
push eax
call sub.MFC42u.DLL_CFileFind::GetFilePath
mov ecx, dword [esp + 0x10]
mov byte [esp + 0x264], 3
push ecx
call esi
cmp eax, ebx
jne 0x4057db
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x40]
push edx
push eax
call sub.MFC42u.DLL_CFile::GetStatus
cmp eax, ebx
je 0x4057db
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x40]
push ecx
push edx
mov byte [esp + 0x58], bl
call sub.MFC42u.DLL_CFile::SetStatus
mov eax, dword [esp + 0x10]
push eax
call esi
mov byte [esp + 0x264], 2
lea ecx, [esp + 0x10]
call sub.MFC42u.DLL_CString::CString
cmp dword [esp + 0x18], ebx
jne 0x40572d
lea ecx, [esp + 0x20]
call sub.MFC42u.DLL_CFileFind::Close
lea ecx, [esp + 0x14]
mov byte [esp + 0x264], 1
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x20]
mov byte [esp + 0x264], bl
call sub.MFC42u.DLL_CFileFind::CFileFind
lea ecx, [esp + 0x26c]
mov dword [esp + 0x264], 0xffffffff
call sub.MFC42u.DLL_CString::CString
mov ecx, dword [esp + 0x25c]
pop edi
pop esi
pop ebp
mov eax, 1
mov dword fs:[0], ecx
pop ebx
add esp, 0x258
ret 4