joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403030
Capabilities:
Get mac address on windows

Disassembly:
sub esp, 0x3c
mov eax, dword [0x422044]
xor eax, esp
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x40]
push ebx
push ebp
push esi
mov esi, edx
mov dword [esp + 0x18], eax
xor eax, eax
xor edx, edx
push 0x288
mov dword [esp + 0x24], esi
mov dword [esp + 0x20], ecx
mov dword [esp + 0x10], 0xffffffff
mov word [esp + 0x28], dx
mov dword [esp + 0x2a], eax
mov dword [esp + 0x2e], eax
mov dword [esp + 0x32], eax
mov dword [esp + 0x36], eax
mov dword [esp + 0x3a], eax
mov dword [esp + 0x3e], eax
mov dword [esp + 0x42], eax
mov word [esp + 0x46], ax
xor ebx, ebx
call fcn.0040a7d2
mov ebp, eax
add esp, 4
lea eax, [esp + 0x10]
push eax
push ebp
mov dword [esp + 0x18], 0x288
call sub.IPHLPAPI.DLL_GetAdaptersInfo
cmp eax, 0x6f
jne 0x4030c3
push ebp
call fcn.0040a89c
mov ecx, dword [esp + 0x14]
push ecx
call fcn.0040a7d2
add esp, 8
mov ebp, eax
lea edx, [esp + 0x10]
push edx
push ebp
call sub.IPHLPAPI.DLL_GetAdaptersInfo
test eax, eax
jne 0x4031a7
mov eax, ebp
mov dword [esp + 0x14], ebp
test ebp, ebp
je 0x4031a7
push edi
jmp 0x4030f4
mov eax, dword [esp + 0x18]
inc dword [esp + 0x10]
test esi, esi
je 0x40310f
mov ecx, dword [eax + 0x194]
mov dword [esi], ecx
mov dx, word [eax + 0x198]
mov word [esi + 4], dx
lea edi, [eax + 0x1ac]
test edi, edi
je 0x403194
lea esp, [esp]
lea edx, [edi + 4]
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403128
sub eax, esi
mov ecx, eax
cmp ecx, 0x10
jle 0x40313d
mov ecx, 0x10
xor eax, eax
test ecx, ecx
jl 0x40315d
cmp eax, ecx
jne 0x40314e
xor esi, esi
mov word [esp + eax*2 + 0x28], si
movsx si, byte [edx + eax]
mov word [esp + eax*2 + 0x28], si
inc eax
cmp eax, ecx
jle 0x403145
lea eax, [esp + 0x28]
push eax
call fcn.00403270
add esp, 4
test eax, eax
je 0x403185
mov edx, dword [esp + 0x1c]
mov eax, dword [edx + ebx*4]
lea ecx, [esp + 0x28]
push ecx
push 0x10
push eax
call fcn.0040a674
add esp, 0xc
mov edi, dword [edi]
inc ebx
test edi, edi
jne 0x403120
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x24]
test ebx, ebx
jg 0x4031a6
mov eax, dword [eax]
mov dword [esp + 0x18], eax
test eax, eax
jne 0x4030f0
pop edi
mov ecx, dword [esp + 0x1c]
mov dword [ecx], ebx
test ebp, ebp
je 0x4031ba
push ebp
call fcn.0040a89c
add esp, 4
mov ecx, dword [esp + 0x44]
mov eax, dword [esp + 0xc]
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040a5bc
add esp, 0x3c
ret
Function at 0x403470
Capabilities:
Check os version

Disassembly:
sub esp, 0x120
mov eax, dword [0x422044]
xor eax, esp
mov dword [esp + 0x11c], eax
push esi
push 0x118
xor esi, esi
lea eax, [esp + 0xc]
push esi
push eax
call fcn.0040f4e0
add esp, 0xc
lea ecx, [esp + 4]
push ecx
mov dword [esp + 8], 0x11c
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x403549
mov eax, dword [esp + 8]
cmp eax, 5
jne 0x403515
mov eax, dword [esp + 0xc]
test eax, eax
jne 0x4034ee
cmp word [esp + 0x118], 4
jb 0x403549
mov esi, 1
mov eax, esi
pop esi
mov ecx, dword [esp + 0x11c]
xor ecx, esp
call fcn.0040a5bc
add esp, 0x120
ret
cmp eax, 2
jae 0x4034f8
cmp eax, 1
jne 0x403549
mov esi, 3
mov eax, esi
pop esi
mov ecx, dword [esp + 0x11c]
xor ecx, esp
call fcn.0040a5bc
add esp, 0x120
ret
cmp eax, 6
jne 0x403549
mov eax, dword [esp + 0xc]
test eax, eax
jne 0x40353f
mov esi, 4
mov eax, esi
pop esi
mov ecx, dword [esp + 0x11c]
xor ecx, esp
call fcn.0040a5bc
add esp, 0x120
ret
cmp eax, 1
jne 0x403549
mov esi, 5
mov ecx, dword [esp + 0x120]
mov eax, esi
pop esi
xor ecx, esp
call fcn.0040a5bc
add esp, 0x120
ret

Function at 0x403570
Capabilities:
Get file size

Disassembly:
sub esp, 0x10
push ebx
push esi
push edi
push 0
push 0
push 3
push 0
push 3
push closesocket
or edi, 0xffffffff
push eax
or ebx, edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, edi
jne 0x4035a2
or eax, edi
or edx, edi
pop edi
pop esi
pop ebx
add esp, 0x10
ret
lea ecx, [esp + 0x10]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
cmp eax, 1
jne 0x4035bb
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
pop edi
pop esi
mov edx, ebx
pop ebx
add esp, 0x10
ret

Function at 0x403700
Capabilities:
Get common file path

Disassembly:
sub esp, 0x20c
mov eax, dword [0x422044]
xor eax, esp
mov dword [esp + 0x208], eax
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0xa]
push ecx
mov word [esp + 0xc], ax
call fcn.0040f4e0
add esp, 0xc
cmp dword [0x423070], 3
jne 0x403760
push 0x104
lea edx, [esp + 4]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push 0x41dc60
lea eax, [esp + 4]
push 0x104
push eax
call fcn.0040a5cb
add esp, 0xc
jmp 0x40376f
lea ecx, [esp]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push esi
lea edx, [esp + 4]
push edx
push str._s_s.exe
push edi
call dword [sym.imp.USER32.dll_wsprintfW]
mov ecx, dword [esp + 0x218]
add esp, 0x10
xor ecx, esp
call fcn.0040a5bc
add esp, 0x20c
ret
Function at 0x403830
Capabilities:
Create process on windows
Get common file path
Write and execute a file
Write file on windows

Disassembly:
sub esp, 0x314
mov eax, dword [0x422044]
xor eax, esp
mov dword [esp + 0x310], eax
lea eax, [esp + 4]
push eax
push 0x104
mov dword [esp + 8], 0
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push str._uinsey.bat
lea ecx, [esp + 8]
push 0x104
push ecx
call fcn.0040bb8b
add esp, 0xc
push 0x104
lea edx, [esp + 0x10c]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [esp + 0x108]
push eax
lea ecx, [esp + 0x210]
push 0x104
push ecx
call fcn.0040b910
lea edx, [esp + 0x218]
push 0x5c
push edx
call fcn.0040bb40
add esp, 0x14
test eax, eax
je 0x4038bb
mov byte [eax], 0
push ebx
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4039b7
mov eax, str.:Repeat_r_ndel___s__r_nif_exist___s__goto_Repeat_r_nrmdir___s__r_ndel___s_
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4038f0
sub eax, edx
push esi
push edi
mov edi, eax
lea eax, [esp + 0x114]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403907
sub eax, edx
mov ecx, eax
lea eax, [esp + 0x10]
lea esi, [eax + 1]
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x403920
sub eax, esi
lea edx, [eax + ecx*2]
add edx, ecx
lea edi, [edx + edi + 0x32]
push edi
call fcn.0040b4fb
push edi
mov esi, eax
push 0
push esi
call fcn.0040f4e0
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x22c]
push ecx
lea edx, [esp + 0x12c]
push edx
mov eax, edx
push eax
push str.:Repeat_r_ndel___s__r_nif_exist___s__goto_Repeat_r_nrmdir___s__r_ndel___s_
push edi
push esi
call fcn.0040bb6d
mov eax, esi
add esp, 0x2c
lea ecx, [eax + 1]
nop
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x403970
push 0
sub eax, ecx
lea ecx, [esp + 0x10]
push ecx
push eax
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 0
push 0
lea edx, [esp + 0x1c]
push edx
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
test esi, esi
je 0x4039b5
push esi
call fcn.0040a778
add esp, 4
pop edi
pop esi
mov ecx, dword [esp + 0x314]
pop ebx
xor ecx, esp
call fcn.0040a5bc
add esp, 0x314
ret

Function at 0x4039d0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x18
xor ecx, ecx
xor eax, eax
mov dword [esp + 4], eax
mov dword [esp + 8], ecx
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], ecx
mov dword [esp], eax
cmp esi, 0xffffffff
je 0x403a21
mov eax, dword [esp + 0x1c]
mov ecx, 0x200
mul ecx
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x10], edx
lea edx, [esp + 4]
push edx
mov dword [esp + 0x10], eax
lea eax, [esp + 4]
push eax
push 0x400
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
add esp, 0x18
ret
Function at 0x403c00
Capabilities:
Get disk information via ioctl

Disassembly:
sub esp, 0x10
push ebx
push ebp
push esi
push edi
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
xor ebp, ebp
xor edi, edi
xor ebx, ebx
cmp dword [esp + 0x24], 0xffffffff
mov dword [esp + 0x10], ebp
mov dword [esp + 0x18], ebp
je 0x403d1e
push 0xc00
call fcn.0040b4fb
mov ecx, dword [esp + 0x28]
add esp, 4
push ebx
mov esi, eax
lea eax, [esp + 0x18]
push eax
push 0xc00
push esi
push ebx
push ebx
push 0x70050
push ecx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x403d11
mov eax, dword [esi + 0x3c]
mov ecx, dword [esi + 0x38]
test eax, eax
jl 0x403c79
jg 0x403c6d
test ecx, ecx
jbe 0x403c79
mov ebx, dword [esi + 0x40]
mov ebp, dword [esi + 0x44]
mov edx, ecx
mov edi, eax
jmp 0x403c7d
mov edx, dword [esp + 0x18]
mov eax, dword [esi + 0xcc]
cmp eax, edi
mov ecx, dword [esi + 0xc8]
jl 0x403ca7
jg 0x403c93
cmp ecx, edx
jbe 0x403ca7
mov ebx, dword [esi + 0xd0]
mov ebp, dword [esi + 0xd4]
mov dword [esp + 0x18], ecx
mov edi, eax
mov edx, ecx
mov eax, dword [esi + 0x15c]
cmp eax, edi
mov ecx, dword [esi + 0x158]
jl 0x403cd1
jg 0x403cbd
cmp ecx, edx
jbe 0x403cd1
mov ebx, dword [esi + 0x160]
mov ebp, dword [esi + 0x164]
mov dword [esp + 0x18], ecx
mov edi, eax
mov edx, ecx
mov eax, dword [esi + 0x1ec]
cmp eax, edi
mov ecx, dword [esi + 0x1e8]
jl 0x403cfb
jg 0x403ce7
cmp ecx, edx
jbe 0x403cfb
mov ebx, dword [esi + 0x1f0]
mov ebp, dword [esi + 0x1f4]
mov dword [esp + 0x18], ecx
mov edi, eax
mov edx, ecx
push 0
add ebx, edx
push 0x200
adc ebp, edi
push ebp
push ebx
call fcn.004173c0
mov dword [esp + 0x10], eax
test esi, esi
je 0x403d1e
push esi
call fcn.0040a778
add esp, 4
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret

Function at 0x403e30
Capabilities:
Get common file path

Disassembly:
sub esp, 0x218
mov eax, dword [0x422044]
xor eax, esp
mov dword [esp + 0x210], eax
push ebx
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0x12]
push ecx
mov word [esp + 0x14], ax
call fcn.0040f4e0
add esp, 0xc
push 0x104
lea edx, [esp + 0xc]
push edx
mov dword [esp + 0xc], 0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
movzx eax, word [esp + 8]
sub eax, 0x41
push eax
lea ebx, [esp + 8]
call fcn.00403af0
mov ebx, dword [esp + 8]
add esp, 4
call fcn.00403a30
cmp eax, 0xffffffff
jne 0x403eb2
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x210]
xor ecx, esp
call fcn.0040a5bc
add esp, 0x218
ret
push esi
call fcn.00403d60
mov ecx, dword [esp + 0x218]
add esp, 4
pop ebx
xor ecx, esp
call fcn.0040a5bc
add esp, 0x218
ret
Function at 0x405020
Capabilities:
Hash data using sha1
Read file on windows

Disassembly:
mov eax, 0x1068
call fcn.004155b0
mov eax, dword [0x422044]
xor eax, esp
mov dword [esp + 0x1064], eax
mov eax, dword [esp + 0x106c]
push ebx
push ebp
push 0x41ddc8
push eax
lea eax, [esp + 0x10]
xor ebx, ebx
push eax
mov dword [esp + 0x14], ebx
xor ebp, ebp
call fcn.0040a9f0
mov eax, dword [esp + 0x14]
add esp, 0xc
cmp eax, ebx
jne 0x40508b
xor eax, eax
mov dword [edi], eax
mov dword [edi + 4], eax
mov dword [edi + 8], eax
pop ebp
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], eax
pop ebx
mov ecx, dword [esp + 0x1064]
xor ecx, esp
call fcn.0040a5bc
add esp, 0x1068
ret
push esi
push 2
push ebx
push eax
call fcn.0040aacd
mov ecx, dword [esp + 0x18]
push ecx
call fcn.0040acef
mov edx, dword [esp + 0x1c]
push ebx
push ebx
push edx
mov dword [esp + 0x2c], eax
call fcn.0040aacd
mov eax, dword [esp + 0x28]
push eax
push 0x1000
lea ecx, [esp + 0x94]
push 1
push ecx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x48], 0x67452301
mov dword [esp + 0x4c], 0xefcdab89
mov dword [esp + 0x50], 0x98badcfe
mov dword [esp + 0x54], 0x10325476
mov dword [esp + 0x58], 0xc3d2e1f0
call fcn.0040affd
mov esi, eax
add esp, 0x2c
cmp esi, ebx
jbe 0x405136
lea edx, [esp + 0x70]
push esi
push edx
lea ebx, [esp + 0x1c]
call fcn.00404e90
mov eax, dword [esp + 0x14]
push eax
push 0x1000
lea ecx, [esp + 0x80]
push 1
push ecx
add ebp, esi
call fcn.0040affd
mov esi, eax
add esp, 0x18
test esi, esi
ja 0x405101
xor ebx, ebx
push edi
lea esi, [esp + 0x18]
call fcn.00404f30
mov edx, dword [esp + 0x10]
push edx
call fcn.0040b091
add esp, 8
pop esi
cmp ebp, dword [esp + 0xc]
jb 0x405064
mov ecx, dword [esp + 0x106c]
pop ebp
pop ebx
xor ecx, esp
mov eax, 1
call fcn.0040a5bc
add esp, 0x1068
ret
Function at 0x405180
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library
Resolve dns

Disassembly:
sub esp, 0x9b0
mov eax, dword [0x422044]
xor eax, esp
mov dword [esp + 0x9a8], eax
push ebp
mov ebp, dword [esp + 0x9b8]
push esi
push edi
xor eax, eax
push 0x7fe
mov edi, ecx
push eax
lea ecx, [esp + 0x1ba]
push ecx
mov word [esp + 0x1bc], ax
call fcn.0040f4e0
add esp, 0xc
lea esi, [esp + 0x1b0]
test edi, edi
je 0x4051cd
mov esi, edi
lea eax, [esp + 0x20]
xor edx, edx
push eax
push 0x101
mov word [esi], dx
mov dword [esp + 0x14], edx
xor edi, edi
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x405239
push 0x41de68
push 0x3ff
push esi
call fcn.0040a674
push 0x41de88
push 0x3ff
push esi
call fcn.0040a5cb
push 0x41de8c
push 0x3ff
push esi
call fcn.0040a5cb
add esp, 0x24
xor eax, eax
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x9a8]
xor ecx, esp
call fcn.0040a5bc
add esp, 0x9b0
ret
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebx], eax
cmp eax, 0xffffffff
je 0x4051ec
push ebp
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x4052d1
push ebp
call dword [sym.imp.WS2_32.dll_inet_addr]
push 2
push 4
lea ecx, [esp + 0x14]
push ecx
mov dword [esp + 0x18], eax
call dword [sym.imp.WS2_32.dll_gethostbyaddr]
test eax, eax
jne 0x4052d1
push 0x41de68
push 0x3ff
push esi
call fcn.0040a674
push 0x41de88
push 0x3ff
push esi
call fcn.0040a5cb
push 0x41de8c
push 0x3ff
push esi
call fcn.0040a5cb
mov eax, dword [ebx]
add esp, 0x24
test eax, eax
je 0x4052b7
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebx], edi
mov ecx, dword [esp + 0x9b4]
mov eax, edi
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.0040a5bc
add esp, 0x9b0
ret
mov edx, dword [eax + 0xc]
mov eax, dword [edx]
mov ecx, dword [eax]
mov eax, dword [esp + 0x9c4]
mov edx, 2
push eax
mov dword [esp + 0x18], ecx
mov word [esp + 0x14], dx
call dword [sym.imp.WS2_32.dll_htons]
mov edx, dword [ebx]
push 0x10
lea ecx, [esp + 0x14]
push ecx
push edx
mov word [esp + 0x1e], ax
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x405317
push 0x41decc
jmp 0x40527a
mov edi, 1
jmp 0x4052b7
Function at 0x405320
Capabilities:
Send data
Send data on socket

Disassembly:
push ecx
mov ecx, dword [esp + 8]
push ebx
xor eax, eax
push ebp
mov ebp, dword [esp + 0x14]
push esi
mov dword [esp + 0xc], eax
cmp dword [ecx], eax
je 0x4053a2
cmp edi, eax
jle 0x40534d
lea ebx, [ebx]
mov dl, byte [eax + ebp]
not dl
mov byte [eax + ebp], dl
inc eax
cmp eax, edi
jl 0x405340
lea ebx, [edi + 7]
push ebx
call fcn.0040b4fb
mov esi, eax
lea eax, [edi + 5]
mov word [esi], ax
mov ecx, dword [str.AS101]
push edi
mov dword [esi + 2], ecx
mov dl, byte [0x4230f4]
lea eax, [esi + 7]
push ebp
push eax
mov byte [esi + 6], dl
call fcn.00410070
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
add esp, 0x10
push 0
push ebx
push esi
push edx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x4053a6
cmp eax, ebx
jne 0x4053a6
mov dword [esp + 0xc], 1
jmp 0x4053a6
mov esi, dword [esp + 0x14]
test esi, esi
je 0x4053b3
push esi
call fcn.0040a778
add esp, 4
mov eax, dword [esp + 0xc]
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0x405500
Capabilities:
Receive data
Receive data on socket

Disassembly:
sub esp, 0x8dc
mov eax, dword [0x422044]
xor eax, esp
mov dword [esp + 0x8d8], eax
mov eax, dword [esp + 0x8e4]
push ebx
push ebp
mov ebp, dword [esp + 0x8e8]
push esi
push edi
mov esi, edx
xor edx, edx
push 0x7fe
mov dword [esp + 0x1c], eax
push edx
lea eax, [esp + 0xf2]
push eax
mov dword [esp + 0x28], ecx
mov word [esp + 0xf4], dx
call fcn.0040f4e0
add esp, 0xc
lea edi, [esp + 0xe8]
mov dword [esp + 0x10], edi
test esi, esi
je 0x405565
mov dword [esp + 0x10], esi
mov edi, esi
xor ecx, ecx
mov word [edi], cx
mov esi, dword [ebp]
xor ebx, ebx
mov dword [esp + 0x14], ebx
test esi, esi
je 0x4056dd
cmp dword [esp + 0x18], ecx
je 0x4056dd
push 0xc7
lea edx, [esp + 0x25]
push ebx
push edx
mov byte [esp + 0x2c], cl
call fcn.0040f4e0
add esp, 0xc
push ebx
push 2
lea eax, [esp + 0x28]
push eax
push esi
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x4056ca
test eax, eax
je 0x4056ca
movzx edi, word [esp + 0x20]
lea ecx, [edi + 2]
push ecx
xor esi, esi
call fcn.0040b4fb
add esp, 4
mov ebx, eax
test edi, edi
jle 0x405682
lea esp, [esp]
mov ecx, dword [ebp]
push 0
mov edx, edi
sub edx, esi
push edx
lea eax, [esi + ebx]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x405665
test eax, eax
je 0x405665
add esi, eax
cmp edi, esi
jg 0x4055e0
cmp esi, 5
jl 0x405682
mov eax, dword [str.AS101]
sub esi, 5
cmp eax, dword [ebx]
jne 0x4056b1
mov cl, byte [ebx + 4]
cmp cl, byte [0x4230f4]
jne 0x4056b1
test esi, esi
jle 0x40563d
lea eax, [ebx + 5]
mov edi, esi
mov dl, byte [eax]
not dl
mov byte [eax], dl
inc eax
sub edi, 1
jne 0x405631
mov edi, dword [esp + 0x1c]
mov eax, dword [edi]
cmp eax, esi
jl 0x405695
mov ecx, dword [esp + 0x18]
push esi
lea eax, [ebx + 5]
push eax
push ecx
call fcn.00410070
mov dword [edi], esi
add esp, 0xc
mov dword [esp + 0x14], 1
jmp 0x405682
mov edx, dword [esp + 0x10]
push 0x41def0
push 0x3ff
push edx
call fcn.0040a674
add esp, 0xc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test ebx, ebx
je 0x40568f
push ebx
call fcn.0040a778
add esp, 4
mov eax, dword [esp + 0x14]
jmp 0x4056df
push eax
mov eax, dword [esp + 0x1c]
lea edx, [ebx + 5]
push edx
push eax
call fcn.00410070
add esp, 0xc
mov dword [esp + 0x14], 1
jmp 0x405682
mov ecx, dword [esp + 0x10]
push 0x41def0
push 0x3ff
push ecx
call fcn.0040a674
add esp, 0xc
jmp 0x405682
push 0x41def0
push 0x3ff
push edi
call fcn.0040a674
add esp, 0xc
mov eax, ebx
mov ecx, dword [esp + 0x8e8]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040a5bc
add esp, 0x8dc
ret
Function at 0x4058c0
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:
mov eax, 0x100c
call fcn.004155b0
mov eax, dword [0x422044]
xor eax, esp
mov dword [esp + 0x1008], eax
mov edx, dword [ebx]
mov eax, dword [esp + 0x1010]
push ebp
mov ebp, dword [sym.imp.WS2_32.dll_recv]
push edi
xor edi, edi
push edi
push 4
lea ecx, [esp + 0x10]
push ecx
push edx
mov dword [esp + 0x1c], eax
call ebp
cmp eax, 4
je 0x405918
pop edi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x1008]
xor ecx, esp
call fcn.0040a5bc
add esp, 0x100c
ret
cmp dword [esp + 8], edi
jbe 0x40595d
push esi
nop
mov ecx, dword [ebx]
push 0
push 0x1000
lea eax, [esp + 0x1c]
push eax
push ecx
call ebp
mov esi, eax
test esi, esi
je 0x40595c
mov edx, dword [esp + 0x10]
mov eax, dword [edx]
push eax
push esi
lea ecx, [esp + 0x1c]
push 1
push ecx
call fcn.0040b26f
add edi, esi
add esp, 0x10
mov dword [0x424710], edi
cmp edi, dword [esp + 0xc]
jb 0x405920
pop esi
mov edx, dword [esp + 0xc]
mov eax, dword [edx]
push eax
call fcn.0040b091
mov ecx, dword [esp + 0x1014]
add esp, 4
cmp edi, dword [esp + 8]
pop edi
sbb eax, eax
pop ebp
xor ecx, esp
inc eax
call fcn.0040a5bc
add esp, 0x100c
ret

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

Disassembly:
sub esp, 0x214
mov eax, dword [0x422044]
xor eax, esp
mov dword [esp + 0x210], eax
push esi
push 0x206
xor esi, esi
lea ecx, [esp + 0x12]
xor eax, eax
push esi
push ecx
mov word [esp + 0x18], ax
call fcn.0040f4e0
add esp, 0xc
cmp edi, esi
je 0x405f08
mov eax, 0x41ddd8
mov dword [esp + 4], esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x405e65
sub eax, edx
sar eax, 1
je 0x405e8f
push 0x41ddd0
lea edx, [esp + 8]
push 0x41ddd8
push edx
call fcn.0040a9f0
add esp, 0xc
jmp 0x405eca
lea eax, [esp + 0xc]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push str.golfinfo.ini
lea ecx, [esp + 0x10]
push 0x104
push ecx
call fcn.0040a5cb
push 0x41ddd0
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x18]
push eax
call fcn.0040a9f0
add esp, 0x18
mov eax, dword [esp + 4]
cmp eax, esi
je 0x405eed
push eax
push 1
push 0x200
push edi
call fcn.0040b26f
mov ecx, dword [esp + 0x14]
push ecx
call fcn.0040b091
add esp, 0x14
mov eax, 1
pop esi
mov ecx, dword [esp + 0x210]
xor ecx, esp
call fcn.0040a5bc
add esp, 0x214
ret
mov ecx, dword [esp + 0x214]
mov eax, esi
pop esi
xor ecx, esp
call fcn.0040a5bc
add esp, 0x214
ret
Function at 0x405f20
Capabilities:
Get common file path
Read file on windows

Disassembly:
sub esp, 0x214
mov eax, dword [0x422044]
xor eax, esp
mov dword [esp + 0x210], eax
push edi
push 0x206
xor edi, edi
lea ecx, [esp + 0x12]
xor eax, eax
push edi
push ecx
mov word [esp + 0x18], ax
call fcn.0040f4e0
add esp, 0xc
mov dword [esp + 4], edi
cmp esi, edi
je 0x406025
mov eax, str.golfset.ini
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x405f65
sub eax, edx
sar eax, 1
je 0x406025
cmp dword [0x423070], 3
jne 0x405fac
push 0x104
lea edx, [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push 0x41dc60
lea eax, [esp + 0x10]
push 0x104
push eax
call fcn.0040a5cb
add esp, 0xc
jmp 0x405fbc
lea ecx, [esp + 0xc]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push str.golfset.ini
lea edx, [esp + 0x10]
push 0x104
push edx
call fcn.0040a5cb
push 0x41ddc8
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x18]
push ecx
call fcn.0040a9f0
mov eax, dword [esp + 0x1c]
add esp, 0x18
cmp eax, edi
je 0x406025
push eax
push 1
push 0x200
push esi
call fcn.0040affd
mov edx, dword [esp + 0x14]
push edx
call fcn.0040b091
add esp, 0x14
mov eax, 1
pop edi
mov ecx, dword [esp + 0x210]
xor ecx, esp
call fcn.0040a5bc
add esp, 0x214
ret
mov ecx, dword [esp + 0x214]
mov eax, edi
pop edi
xor ecx, esp
call fcn.0040a5bc
add esp, 0x214
ret

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

Disassembly:
sub esp, 0x214
mov eax, dword [0x422044]
xor eax, esp
mov dword [esp + 0x210], eax
push edi
push 0x206
xor edi, edi
lea ecx, [esp + 0x12]
xor eax, eax
push edi
push ecx
mov word [esp + 0x18], ax
call fcn.0040f4e0
add esp, 0xc
mov dword [esp + 4], edi
cmp esi, edi
je 0x40610f
mov eax, str.golfinfo.ini
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x406085
sub eax, edx
sar eax, 1
je 0x40610f
lea edx, [esp + 0xc]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push str.golfinfo.ini
lea eax, [esp + 0x10]
push 0x104
push eax
call fcn.0040a5cb
push 0x41ddc8
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x18]
push edx
call fcn.0040a9f0
mov eax, dword [esp + 0x1c]
add esp, 0x18
cmp eax, edi
je 0x40610f
push eax
push 1
push 0x200
push esi
call fcn.0040affd
mov eax, dword [esp + 0x14]
push eax
call fcn.0040b091
add esp, 0x14
mov eax, 1
pop edi
mov ecx, dword [esp + 0x210]
xor ecx, esp
call fcn.0040a5bc
add esp, 0x214
ret
mov ecx, dword [esp + 0x214]
mov eax, edi
pop edi
xor ecx, esp
call fcn.0040a5bc
add esp, 0x214
ret
Function at 0x406270
Capabilities:
Check if file exists
Delete file
Get file attributes
Set file attributes

Disassembly:
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push esi
call edi
cmp eax, 0xffffffff
je 0x4062c3
push esi
call edi
cmp eax, 0xffffffff
je 0x4062be
test al, 1
je 0x40628e
xor eax, 1
test al, 4
je 0x406295
xor eax, 4
test al, 2
je 0x40629c
xor eax, 2
test al, 0x20
je 0x4062a3
xor eax, 0x20
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test edi, edi
jne 0x4062c3
or eax, 0xffffffff
pop edi
ret
push 0
push 0
push 2
push 0
push 1
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
pop edi
ret