joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40119c
Capabilities:
Get common file path
Set current directory

Disassembly:
mov eax, 0x43d238
call fcn.0041de9c
sub esp, 0x128
push ebx
push esi
push edi
mov ebx, ecx
mov cl, byte [ebp + 0x17]
xor eax, eax
mov dword [ebp - 4], eax
mov byte [ebp - 0x1c], cl
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
and byte [ebp - 0x134], al
push 0x40
pop ecx
lea edi, [ebp - 0x133]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x134]
mov byte [ebp - 4], 1
push eax
push 0x104
mov byte [ebx + 0x6c], 1
call dword [sym.imp.KERNEL32.DLL_GetCurrentDirectoryA]
mov eax, dword [ebx + 0x98]
mov ecx, dword [ebx + 0x94]
lea esi, [ebx + 0x90]
push eax
push ecx
mov ecx, esi
call fcn.00402b29
lea eax, [ebp - 0x1c]
push 0
push eax
lea eax, [ebp + 8]
sub esp, 0x10
mov ecx, esp
mov dword [ebp - 0x20], esp
push eax
call fcn.004027c1
mov ecx, ebx
call fcn.00401304
cmp dword [ebp - 0x18], 0
mov edi, dword [ebp - 0x14]
je 0x4012a6
mov eax, edi
sub eax, dword [ebp - 0x18]
test eax, 0xfffffff0
je 0x4012a6
mov al, byte [edi - 0x10]
add edi, 0xfffffff0
push 0
lea ecx, [ebp - 0x30]
mov byte [ebp - 0x30], al
call fcn.004029a7
push dword [0x44067c]
lea ecx, [ebp - 0x30]
push 0
push edi
call fcn.004028ad
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 0x1c]
add eax, 0xfffffff0
mov byte [ebp - 4], 2
push eax
call fcn.00402acb
lea eax, [ebp - 0x1c]
push 1
push eax
lea eax, [ebp - 0x30]
sub esp, 0x10
mov ecx, esp
mov dword [ebp - 0x20], esp
push eax
call fcn.004027c1
mov ecx, ebx
call fcn.00401304
push 1
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 1
call fcn.004029a7
jmp 0x40122c
push edi
lea ecx, [ebp - 0x1c]
push dword [ebp - 0x18]
call fcn.00402b29
lea eax, [ebp - 0x134]
push eax
call dword [sym.imp.KERNEL32.DLL_SetCurrentDirectoryA]
mov eax, dword [esi + 4]
test eax, eax
jne 0x4012ca
xor esi, esi
jmp 0x4012d2
mov esi, dword [esi + 8]
sub esi, eax
sar esi, 4
test esi, esi
sete bl
and byte [ebp - 4], 0
lea ecx, [ebp - 0x1c]
call fcn.00402867
or dword [ebp - 4], 0xffffffff
push 1
lea ecx, [ebp + 8]
call fcn.004029a7
mov ecx, dword [ebp - 0xc]
pop edi
mov al, bl
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 0x10
Function at 0x4016a8
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x43d2c6
call fcn.0041de9c
sub esp, 0x190
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x24], esi
push 1
lea eax, [ebp + 8]
pop edi
push 0x44e1c8
push eax
lea eax, [ebp - 0x9c]
mov dword [ebp - 4], edi
push eax
call fcn.0040354b
lea ecx, [ebp + 0x18]
mov byte [ebp - 4], 2
push ecx
push eax
lea eax, [ebp - 0x64]
push eax
call fcn.004035d4
push str..hdr
push eax
lea eax, [ebp - 0x54]
mov byte [ebp - 4], 3
push eax
call fcn.0040354b
add esp, 0x24
push edi
lea ecx, [ebp - 0x64]
mov byte [ebp - 4], 6
call fcn.004029a7
push edi
lea ecx, [ebp - 0x9c]
mov byte [ebp - 4], 5
call fcn.004029a7
mov eax, dword [ebp - 0x50]
xor ebx, ebx
cmp eax, ebx
jne 0x40172e
mov eax, 0x440680
push ebx
push 0x80
push 3
push ebx
push edi
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x14], eax
jne 0x401754
mov byte [ebp - 0xd], bl
jmp 0x40188a
lea ecx, [esi + 0x28]
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x28], ebx
call fcn.00402a81
lea eax, [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.DLL_ReadFile]
push ebx
push eax
lea eax, [ebp - 0x20]
push 4
push eax
push dword [ebp - 0x14]
call esi
cmp dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
jle 0x40187d
push pe_nt_image_headers32
lea eax, [ebp - 0x19c]
push ebx
push eax
call fcn.0041e0b0
mov al, byte [ebp + 0x17]
add esp, 0xc
lea ecx, [ebp - 0x44]
mov byte [ebp - 0x44], al
push ebx
call fcn.004029a7
lea eax, [ebp - 0x18]
push ebx
push eax
lea eax, [ebp - 0x28]
push 4
push eax
push dword [ebp - 0x14]
mov byte [ebp - 4], 7
call esi
lea eax, [ebp - 0x18]
push ebx
push eax
lea eax, [ebp - 0x19c]
push dword [ebp - 0x28]
push eax
push dword [ebp - 0x14]
call esi
lea eax, [ebp - 0x19c]
push eax
call fcn.0041dec0
pop ecx
push eax
lea eax, [ebp - 0x19c]
push eax
lea ecx, [ebp - 0x44]
call fcn.00402b89
lea eax, [ebp - 0x18]
push ebx
push eax
lea eax, [ebp - 0x30]
push 4
push eax
push dword [ebp - 0x14]
call esi
lea eax, [ebp - 0x18]
push ebx
push eax
lea eax, [ebp - 0x2c]
push 4
push eax
push dword [ebp - 0x14]
call esi
mov eax, dword [ebp - 0x40]
cmp eax, ebx
jne 0x401819
mov eax, 0x440680
mov ecx, dword [ebp - 0x24]
push eax
call fcn.00403eab
mov dword [ebp - 0x8c], eax
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0x88]
call fcn.004023ad
lea eax, [ebp - 0x8c]
mov byte [ebp - 4], 8
push eax
lea eax, [ebp - 0x6c]
push eax
mov eax, dword [ebp - 0x24]
lea ecx, [eax + 0x28]
call fcn.004029e3
push edi
lea ecx, [ebp - 0x88]
mov byte [ebp - 4], 7
call fcn.004029a7
push edi
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 5
call fcn.004029a7
inc dword [ebp - 0x1c]
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x20]
jl 0x401784
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov byte [ebp - 0xd], 1
push edi
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 1
call fcn.004029a7
push edi
lea ecx, [ebp + 8]
mov byte [ebp - 4], bl
call fcn.004029a7
or dword [ebp - 4], 0xffffffff
push edi
lea ecx, [ebp + 0x18]
call fcn.004029a7
mov ecx, dword [ebp - 0xc]
mov al, byte [ebp - 0xd]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x20
Function at 0x4023e9
Capabilities:
Delete file

Disassembly:
mov eax, 0x43d418
call fcn.0041de9c
sub esp, 0x34
push ebx
push esi
push edi
mov edi, ecx
mov al, byte [ebp + 8]
sub esp, 0x10
xor ebx, ebx
mov esi, esp
mov dword [ebp - 0x10], esp
push ebx
mov ecx, esi
mov dword [ebp - 4], ebx
mov byte [esi], al
call fcn.004029a7
push dword [0x44067c]
lea eax, [ebp + 8]
mov ecx, esi
push ebx
push eax
call fcn.004028ad
mov ecx, edi
call fcn.0040119c
mov esi, dword [edi + 0x94]
mov eax, dword [edi + 0x98]
cmp esi, eax
mov dword [ebp - 0x10], eax
je 0x4024ea
mov al, byte [esi]
push ebx
lea ecx, [ebp - 0x20]
mov byte [ebp - 0x20], al
call fcn.004029a7
push dword [0x44067c]
lea ecx, [ebp - 0x20]
push ebx
push esi
call fcn.004028ad
lea eax, [ebp + 8]
push 0x44e1c8
push eax
lea eax, [ebp - 0x40]
push eax
mov byte [ebp - 4], 1
call fcn.0040354b
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 2
push ecx
push eax
lea eax, [ebp - 0x30]
push eax
call fcn.004035d4
add esp, 0x18
push dword [0x44067c]
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 3
push ebx
push eax
call fcn.004028ad
push 1
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 2
call fcn.004029a7
push 1
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 1
call fcn.004029a7
mov eax, dword [ebp - 0x1c]
cmp eax, ebx
jne 0x4024ca
mov eax, 0x440680
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileA]
push 1
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], bl
call fcn.004029a7
add esi, 0x10
cmp esi, dword [ebp - 0x10]
jne 0x402445
mov eax, dword [edi + 0x98]
mov edx, dword [edi + 0x94]
lea ecx, [edi + 0x90]
push eax
push edx
call fcn.00402b29
or dword [ebp - 4], 0xffffffff
push 1
lea ecx, [ebp + 8]
call fcn.004029a7
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov al, 1
mov dword fs:[0], ecx
pop ebx
leave
ret 0x10
Function at 0x402524
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x43d434
call fcn.0041de9c
sub esp, 0x30
push ebx
push edi
mov edi, ecx
mov eax, dword [edi + 0x34]
xor ebx, ebx
cmp eax, ebx
mov dword [ebp - 4], ebx
je 0x402653
mov eax, dword [ebp + 0xc]
cmp eax, ebx
jne 0x402551
mov eax, 0x440680
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x10], eax
je 0x402653
mov eax, dword [edi + 0x2c]
mov dword [ebp - 0x1c], ebx
push esi
mov esi, dword [sym.imp.KERNEL32.DLL_WriteFile]
mov eax, dword [eax]
push ebx
mov dword [ebp - 0x18], eax
mov eax, dword [edi + 0x34]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x20]
push 4
push eax
push dword [ebp - 0x10]
call esi
mov eax, dword [edi + 0x2c]
cmp dword [ebp - 0x18], eax
je 0x402647
mov eax, dword [ebp - 0x18]
lea ecx, [ebp - 0x3c]
add eax, 0x10
push eax
call fcn.004023ad
mov eax, dword [ebp - 0x34]
push ebx
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x1c]
push 4
push eax
push dword [ebp - 0x10]
mov byte [ebp - 4], 1
call esi
cmp dword [ebp - 0x34], ebx
je 0x4025f3
cmp dword [ebp - 0x38], ebx
je 0x4025e7
lea ecx, [ebp - 0x3c]
call fcn.0040297b
mov eax, dword [ebp - 0x38]
jmp 0x4025ec
mov eax, 0x440680
push eax
call dword [sym.imp.USER32.dll_CharLowerA]
mov eax, dword [ebp - 0x38]
cmp eax, ebx
jne 0x4025ff
mov eax, 0x440680
lea ecx, [ebp - 0x14]
push ebx
push ecx
push dword [ebp - 0x1c]
push eax
push dword [ebp - 0x10]
call esi
lea eax, [ebp - 0x14]
push ebx
push eax
lea eax, [ebp - 0x28]
push 4
push eax
push dword [ebp - 0x10]
call esi
lea eax, [ebp - 0x14]
push ebx
push eax
lea eax, [ebp - 0x24]
push 4
push eax
push dword [ebp - 0x10]
call esi
push 1
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], bl
call fcn.004029a7
lea ecx, [ebp - 0x18]
call fcn.00402a95
jmp 0x40259b
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov bl, 1
pop esi
or dword [ebp - 4], 0xffffffff
push 1
lea ecx, [ebp + 8]
call fcn.004029a7
mov ecx, dword [ebp - 0xc]
mov al, bl
pop edi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x10

Function at 0x402754
Capabilities:
Get file size

Disassembly:
mov eax, 0x43d464
call fcn.0041de9c
push ebx
push esi
mov eax, dword [ebp + 0xc]
xor ebx, ebx
cmp eax, ebx
jne 0x40276e
mov eax, 0x440680
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x40279a
push ebx
push esi
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
test eax, eax
jbe 0x40279a
mov bl, 1
push esi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
or dword [ebp - 4], 0xffffffff
push 1
lea ecx, [ebp + 8]
call fcn.004029a7
mov ecx, dword [ebp - 0xc]
mov al, bl
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x10
Function at 0x403b45
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x43d5ec
call fcn.0041de9c
sub esp, 0x158
push ebx
push edi
mov dword [ebp - 0x1c], ecx
xor ebx, ebx
add ecx, 0x28
mov dword [ebp - 4], ebx
call fcn.00402a81
mov eax, dword [ebp + 0xc]
cmp eax, ebx
jne 0x403b73
mov eax, 0x440680
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x403cac
push esi
mov esi, dword [sym.imp.KERNEL32.DLL_ReadFile]
lea eax, [ebp - 0x10]
push ebx
push eax
lea eax, [ebp - 0x18]
push 4
push eax
push edi
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x20], ebx
call esi
cmp dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ebx
jle 0x403ca2
push pe_nt_image_headers32
lea eax, [ebp - 0x164]
push ebx
push eax
call fcn.0041e0b0
mov al, byte [ebp + 0x17]
add esp, 0xc
lea ecx, [ebp - 0x3c]
mov byte [ebp - 0x3c], al
push ebx
call fcn.004029a7
lea eax, [ebp - 0x10]
push ebx
push eax
lea eax, [ebp - 0x20]
push 4
push eax
push edi
mov byte [ebp - 4], 1
call esi
lea eax, [ebp - 0x10]
push ebx
push eax
lea eax, [ebp - 0x164]
push dword [ebp - 0x20]
push eax
push edi
call esi
lea eax, [ebp - 0x164]
push eax
call fcn.0041dec0
pop ecx
push eax
lea eax, [ebp - 0x164]
push eax
lea ecx, [ebp - 0x3c]
call fcn.00402b89
lea eax, [ebp - 0x10]
push ebx
push eax
lea eax, [ebp - 0x28]
push 4
push eax
push edi
call esi
lea eax, [ebp - 0x10]
push ebx
push eax
lea eax, [ebp - 0x24]
push 4
push eax
push edi
call esi
mov eax, dword [ebp - 0x38]
cmp eax, ebx
jne 0x403c49
mov eax, 0x440680
mov ecx, dword [ebp - 0x1c]
push eax
call fcn.00403eab
mov dword [ebp - 0x5c], eax
lea eax, [ebp - 0x3c]
push eax
lea ecx, [ebp - 0x58]
call fcn.004023ad
lea eax, [ebp - 0x5c]
mov byte [ebp - 4], 2
push eax
lea eax, [ebp - 0x64]
push eax
mov eax, dword [ebp - 0x1c]
lea ecx, [eax + 0x28]
call fcn.004029e3
push 1
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 1
call fcn.004029a7
push 1
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], bl
call fcn.004029a7
inc dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x18]
jl 0x403bbc
push edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov bl, 1
pop esi
or dword [ebp - 4], 0xffffffff
push 1
lea ecx, [ebp + 8]
call fcn.004029a7
mov ecx, dword [ebp - 0xc]
mov al, bl
pop edi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x10
Function at 0x403ccc
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x43d620
call fcn.0041de9c
sub esp, 0x60
push ebx
push edi
mov dword [ebp - 0x1c], ecx
mov eax, dword [ecx + 0x34]
xor ebx, ebx
cmp eax, ebx
mov dword [ebp - 4], ebx
je 0x403e59
mov eax, dword [ecx + 0x2c]
mov ecx, dword [eax]
cmp ecx, eax
mov dword [ebp - 0x18], ecx
je 0x403e57
mov edi, dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov al, byte [ebp + 0x17]
push ebx
lea ecx, [ebp - 0x30]
mov byte [ebp - 0x30], al
call fcn.004029a7
mov eax, dword [ebp - 0x18]
lea ecx, [ebp - 0x6c]
add eax, 0x10
mov byte [ebp - 4], 1
push eax
call fcn.004023ad
lea eax, [ebp + 8]
push 0x44e1c8
push eax
lea eax, [ebp - 0x50]
push eax
mov byte [ebp - 4], 2
call fcn.0040354b
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 3
push ecx
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.004035d4
add esp, 0x18
push dword [0x44067c]
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 4
push ebx
push eax
call fcn.004028ad
push 1
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 3
call fcn.004029a7
push 1
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 2
call fcn.004029a7
mov eax, dword [ebp - 0x2c]
cmp eax, ebx
jne 0x403d8d
mov eax, 0x440680
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x10], eax
je 0x403e20
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x20], ebx
inc eax
push eax
call fcn.004312bc
cmp eax, ebx
pop ecx
mov dword [ebp - 0x14], eax
je 0x403e79
mov ecx, dword [ebp - 0x54]
inc ecx
push ecx
push ebx
push eax
call fcn.0041e0b0
mov eax, dword [ebp - 0x1c]
add esp, 0xc
mov ecx, dword [eax + 0x20]
cmp ecx, ebx
je 0x403e79
push dword [ebp - 0x54]
mov eax, dword [ecx]
push dword [ebp - 0x58]
call dword [eax + 8]
cmp eax, ebx
je 0x403e79
push dword [ebp - 0x54]
push eax
push dword [ebp - 0x14]
call fcn.0041e360
add esp, 0xc
lea eax, [ebp - 0x20]
push ebx
push eax
push dword [ebp - 0x54]
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
push dword [ebp - 0x14]
call fcn.004312e5
pop ecx
push dword [ebp - 0x10]
call edi
push 1
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 1
call fcn.004029a7
push 1
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], bl
call fcn.004029a7
lea ecx, [ebp - 0x18]
call fcn.00402a95
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x2c]
cmp dword [ebp - 0x18], eax
jne 0x403d04
mov bl, 1
or dword [ebp - 4], 0xffffffff
push 1
lea ecx, [ebp + 8]
call fcn.004029a7
mov al, bl
mov ecx, dword [ebp - 0xc]
pop edi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x10
push dword [ebp - 0x10]
call edi
push 1
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 1
call fcn.004029a7
push 1
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], bl
call fcn.004029a7
or dword [ebp - 4], 0xffffffff
push 1
lea ecx, [ebp + 8]
call fcn.004029a7
xor al, al
jmp 0x403e69

Function at 0x403eab
Capabilities:
Hash data using djb2

Disassembly:
push esi
mov esi, dword [esp + 8]
push esi
call fcn.0041dec0
pop ecx
mov edx, eax
xor ecx, ecx
mov eax, 0x1505
test edx, edx
jbe 0x403ed4
push edi
movsx edi, byte [ecx + esi]
imul eax, eax, 0x21
add eax, edi
inc ecx
cmp ecx, edx
jb 0x403ec5
pop edi
pop esi
ret 4
Function at 0x404a99
Capabilities:
Get common file path
Read .ini file

Disassembly:
mov eax, 0x43d6d0
call fcn.0041de9c
sub esp, 0x350
mov dl, byte [0x454070]
push ebx
push esi
push edi
mov dword [ebp - 0x10], ecx
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x257]
mov byte [ebp - 0x258], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x40
xor eax, eax
pop ecx
lea edi, [ebp - 0x153]
mov byte [ebp - 0x154], dl
push 0x40
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x35b]
mov byte [ebp - 0x35c], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov esi, dword [sym.imp.KERNEL32.DLL_GetCurrentDirectoryA]
mov ebx, 0x104
stosb byte es:[edi], al
lea eax, [ebp - 0x258]
push eax
push ebx
call esi
lea eax, [ebp - 0x35c]
push eax
push ebx
call esi
mov esi, dword [sym.imp.KERNEL32.DLL_lstrcatA]
lea eax, [ebp - 0x258]
push str.Path.Ini
push eax
call esi
lea eax, [ebp - 0x258]
push eax
push 0
push str.Count
push 0x44e208
call dword [sym.imp.KERNEL32.DLL_GetPrivateProfileIntA]
mov edi, eax
test edi, edi
mov dword [ebp - 0x1c], edi
jg 0x404b53
xor al, al
jmp 0x404c80
mov eax, dword [ebp - 0x10]
mov edx, dword [eax + 0x844]
lea ecx, [eax + 0x840]
mov dword [ebp - 0x20], ecx
mov eax, dword [ecx + 8]
push eax
push edx
call fcn.00402b29
mov ecx, dword [ebp - 0x10]
push 4
pop edx
lea eax, [ecx + 0x83c]
cmp edi, edx
mov dword [eax], edi
jle 0x404b83
mov dword [eax], edx
and dword [ebp - 0x10], 0
test edi, edi
jle 0x404c7e
add ecx, 0x2c
mov dword [ebp - 0x14], ecx
mov al, byte [0x454070]
push 7
mov byte [ebp - 0x50], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x4f]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push ebx
lea eax, [ebp - 0x154]
push 0
push eax
call fcn.0041e0b0
add esp, 0xc
lea eax, [ebp - 0x50]
push dword [ebp - 0x10]
push 0x44e1e8
push eax
call fcn.0041e050
mov eax, dword [ebp - 0x14]
add esp, 0xc
lea edi, [eax + 0x100]
lea eax, [ebp - 0x258]
push eax
push 0x20
push edi
lea eax, [ebp - 0x50]
push 0x454070
push eax
push 0x44e208
call dword [sym.imp.KERNEL32.DLL_GetPrivateProfileStringA]
lea eax, [ebp - 0x154]
push edi
push eax
call esi
mov al, byte [ebp - 0x15]
push 0
lea ecx, [ebp - 0x30]
mov byte [ebp - 0x30], al
call fcn.004029a7
lea eax, [ebp - 0x154]
push eax
call fcn.0041dec0
pop ecx
push eax
lea eax, [ebp - 0x154]
push eax
lea ecx, [ebp - 0x30]
call fcn.00402b89
mov ecx, dword [ebp - 0x20]
and dword [ebp - 4], 0
lea eax, [ebp - 0x30]
push eax
call fcn.0040289c
or dword [ebp - 4], 0xffffffff
push 1
lea ecx, [ebp - 0x30]
call fcn.004029a7
lea eax, [ebp - 0x35c]
push eax
push dword [ebp - 0x14]
call esi
push 0x44e1c8
push dword [ebp - 0x14]
call esi
push edi
push dword [ebp - 0x14]
call esi
inc dword [ebp - 0x10]
add dword [ebp - 0x14], 0x204
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x1c]
jl 0x404b95
mov al, 1
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
Function at 0x404e1a
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x118
and byte [ebp - 1], 0
and dword [ebp - 8], 0
cmp dword [ecx + 0x83c], 0
push ebx
push esi
push edi
mov dword [ebp - 0xc], ecx
jle 0x404f41
mov esi, dword [sym.imp.KERNEL32.DLL_lstrcatA]
lea ebx, [ecx + 0x12c]
mov al, byte [0x454070]
push 0x40
mov byte [ebp - 0x118], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x117]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebx - 0x100]
push eax
lea eax, [ebp - 0x118]
push eax
call esi
lea eax, [ebp - 0x118]
push 0x44e1c8
push eax
call esi
lea eax, [ebp - 0x118]
push ebx
push eax
call esi
lea eax, [ebp - 0x118]
push str..src
push eax
call esi
xor edi, edi
lea eax, [ebp - 0x118]
push edi
push 0x80
push 3
push edi
push 1
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x10], eax
je 0x404f0f
push edi
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
test eax, eax
jbe 0x404f0f
mov al, byte [ebp - 1]
sub esp, 0x10
mov edi, esp
mov dword [ebp - 0x14], esp
push 0
mov ecx, edi
mov byte [edi], al
call fcn.004029a7
push ebx
call fcn.0041dec0
pop ecx
push eax
push ebx
mov ecx, edi
call fcn.00402b89
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 8]
call fcn.0040119c
test al, al
jne 0x404f1d
mov dword [ebx + 0x100], 2
jmp 0x404f19
mov dword [ebx + 0x100], 1
mov byte [ebp - 1], 1
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
inc dword [ebp - 8]
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
add ebx, 0x204
cmp ecx, dword [eax + 0x83c]
jl 0x404e4a
mov al, byte [ebp - 1]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40501e
Capabilities:
Get file size

Disassembly:
push esi
push edi
xor edi, edi
mov esi, ecx
push edi
push 0x80
push 3
push edi
push 1
push SysReAllocStringLen
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
cmp eax, 0xffffffff
mov dword [esi + 0x14], eax
jne 0x40504b
mov dword [esi + 0x14], edi
jmp 0x405062
push edi
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
mov dword [esi + 0x1c], eax
mov dword [esi + 0x20], edi
mov dword [esi + 0x24], edi
mov dword [esi + 0x18], edi
mov dword [esi + 0x28], edi
pop edi
xor al, al
pop esi
ret 4
Function at 0x405546
Capabilities:
Connect socket
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
xor ebx, ebx
mov esi, ecx
cmp edi, ebx
je 0x40565e
cmp dword [ebp + 0x10], ebx
je 0x40565e
cmp dword [esi + 4], 0xffffffff
je 0x40557d
call fcn.0040552c
push 0x12c
call dword [sym.imp.KERNEL32.DLL_Sleep]
mov al, byte [edi]
cmp al, 0x30
jl 0x4055a7
cmp al, 0x39
jg 0x4055a7
push 0x10
lea eax, [ebp - 0x14]
push ebx
push eax
call fcn.0041e0b0
add esp, 0xc
mov word [ebp - 0x14], 2
push edi
call sub.WSOCK32.dll_inet_addr
mov dword [ebp - 0x10], eax
jmp 0x4055e1
push edi
call sub.WSOCK32.dll_gethostbyname
mov edi, eax
cmp edi, ebx
je 0x40565e
push 0x10
lea eax, [ebp - 0x14]
push ebx
push eax
call fcn.0041e0b0
movsx eax, word [edi + 0xa]
push eax
mov eax, dword [edi + 0xc]
push dword [eax]
lea eax, [ebp - 0x10]
push eax
call fcn.0041e360
mov ax, word [edi + 8]
add esp, 0x18
mov word [ebp - 0x14], ax
push dword [ebp + 0x10]
call sub.WSOCK32.dll_htons
push ebx
push 1
pop ebx
mov word [ebp - 0x12], ax
push ebx
push 2
call sub.WSOCK32.dll_socket
cmp eax, ebx
mov dword [esi + 4], eax
jb 0x40565e
lea ecx, [ebp - 4]
push 4
push ecx
mov edi, 0xffff
push 0x1002
push edi
push eax
mov dword [ebp - 4], 0x2800
call sub.WSOCK32.dll_setsockopt
and word [ebp + 0xe], 0
lea eax, [ebp + 0xc]
push 4
push eax
push 0x80
push edi
push dword [esi + 4]
mov word [ebp + 0xc], bx
call sub.WSOCK32.dll_setsockopt
lea eax, [ebp - 0x14]
push 0x10
push eax
push dword [esi + 4]
call sub.WSOCK32.dll_connect
test eax, eax
je 0x405667
call sub.WSOCK32.dll_WSAGetLastError
push dword [esi + 4]
call sub.WSOCK32.dll_closesocket
or dword [esi + 4], 0xffffffff
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0xc
mov edi, dword [ebp + 8]
push 0x31
push 0x401
push edi
push dword [esi + 4]
call sub.WSOCK32.dll_WSAAsyncSelect
mov dword [esi + 8], edi
mov eax, ebx
jmp 0x405660

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

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, ecx
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x4056ee
push ebx
lea ecx, [ebp - 4]
push edi
push ecx
push 0x4004667f
push eax
xor ebx, ebx
call sub.WSOCK32.dll_ioctlsocket
cmp dword [ebp - 4], ebx
jbe 0x4056d8
lea edi, [esi + 0xc]
push 0
push 0x2800
push edi
push dword [esi + 4]
call sub.WSOCK32.dll_recv
cmp eax, 0xffffffff
je 0x4056d8
test eax, eax
je 0x4056d3
push eax
push edi
lea ecx, [esi + 0x280c]
add ebx, eax
call fcn.004056f1
cmp ebx, dword [ebp - 4]
jb 0x4056ab
mov ecx, esi
call fcn.004057cd
pop edi
pop ebx
test eax, eax
je 0x4056ee
mov ecx, esi
call fcn.004057cd
jmp 0x4056e1
pop esi
leave
ret