joyce8/EMBER2024-capa huggingface dataset:
Function at 0x405784
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x46339e
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x479700]
xor eax, esp
mov dword [esp + 0x20], eax
push esi
mov eax, dword [0x479700]
xor eax, esp
push eax
lea eax, [esp + 0x30]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
and dword [esp + 0xc], 0
push eax
lea eax, [esp + 0x14]
push eax
call fcn.00405312
pop ecx
pop ecx
and dword [esp + 0x38], 0
mov edx, eax
mov ecx, esi
call fcn.0040580a
push 0
push 1
lea ecx, [esp + 0x18]
call fcn.00404662
mov eax, esi
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.00445a5e
mov esp, ebp
pop ebp
ret

Function at 0x405833
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x46339e
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x479700]
xor eax, esp
mov dword [esp + 0x20], eax
push esi
mov eax, dword [0x479700]
xor eax, esp
push eax
lea eax, [esp + 0x30]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
and dword [esp + 0xc], 0
push eax
lea eax, [esp + 0x14]
push eax
call fcn.00405312
push dword [ebp + 0x10]
and dword [esp + 0x44], 0
mov edx, eax
mov ecx, esi
call fcn.004058bd
add esp, 0xc
lea ecx, [esp + 0x10]
push 0
push 1
call fcn.00404662
mov eax, esi
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.00445a5e
mov esp, ebp
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x479700]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x405a6e
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
and eax, 0xfffffffe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x405a6e
push 0x208
push eax
mov word [ebp - 0x210], ax
lea eax, [ebp - 0x20e]
push eax
call fcn.004469f0
add esp, 0xc
lea eax, [ebp - 0x210]
push esi
push 0x20a
push eax
call fcn.0040551d
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
push 0x46e7b8
lea ecx, [ebp - 0x210]
call fcn.00405550
push esi
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push eax
lea ecx, [ebp - 0x210]
call fcn.00405550
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x405a44
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [ebp - 0x210]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileW]
cmp eax, 1
jne 0x405a6a
push 4
push 0
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
jmp 0x405a71
xor eax, eax
jmp 0x405a71
xor eax, eax
inc eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.00445a5e
mov esp, ebp
pop ebp
ret
Function at 0x4061c6
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push 0xcc
mov eax, 0x463557
call fcn.00449140
push ecx
lea ecx, [ebp - 0xd0]
mov bl, 1
call fcn.00406561
and dword [ebp - 4], 0
lea ecx, [ebp - 0x40]
push ecx
mov ecx, eax
call fcn.004054c5
and dword [ebp - 0x18], 0
lea ecx, [ebp - 0x28]
xor eax, eax
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
lea eax, [ebp - 0x40]
push eax
call fcn.0040401f
push 0
push 1
lea ecx, [ebp - 0x40]
call fcn.00404662
lea ecx, [ebp - 0xd0]
mov byte [ebp - 4], 2
call fcn.00405712
push ecx
push ecx
lea ecx, [ebp - 0x28]
call fcn.004064cc
mov ecx, eax
lea eax, [ecx + 1]
cmp dword [ebp - 0x18], eax
jne 0x406249
push 0
push ecx
lea ecx, [ebp - 0x28]
call fcn.0040682f
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4062c7
push ecx
push ecx
lea ecx, [ebp - 0x28]
call fcn.004064cc
test eax, eax
je 0x4062a7
cmp eax, 0xffffffff
je 0x4062a7
push eax
push 0
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0x28]
call fcn.00404ef5
lea edx, [ebp - 0x58]
mov byte [ebp - 4], 3
lea ecx, [ebp - 0xd8]
call fcn.0040580a
push 0
push 1
lea ecx, [ebp - 0x58]
mov bl, byte [eax + 4]
mov byte [eax + 5], 1
call fcn.00404662
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
push 0
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test bl, bl
je 0x4062d3
test eax, eax
je 0x4062d3
mov bl, 1
jmp 0x4062d5
test al, 0x10
jne 0x4062d5
push 0x50
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor bl, bl
push 0
push 1
lea ecx, [ebp - 0x28]
call fcn.00404662
mov al, bl
call fcn.004490ef
ret

Function at 0x406347
Capabilities:
Get common file path

Disassembly:
push 0x10
mov eax, 0x4635bc
call fcn.0044910d
mov esi, edx
mov edi, ecx
mov eax, 0x104
lea ecx, [ebp - 0x1c]
xor ebx, ebx
mov dword [ebp - 0x18], eax
push eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x1c], ebx
call fcn.00403c31
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 0x18]
add eax, eax
push eax
push ebx
push dword [ebp - 0x1c]
call fcn.004469f0
add esp, 0xc
mov dword [ebp - 0x10], ebx
lea eax, [ebp - 0x10]
push eax
push esi
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
cmp dword [ebp - 0x10], ebx
je 0x4063b5
push dword [ebp - 0x1c]
push dword [ebp - 0x10]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
test eax, eax
je 0x4063b5
push dword [ebp - 0x1c]
mov ecx, edi
call fcn.0040547b
jmp 0x4063bf
push dword [ebp + 8]
mov ecx, edi
call fcn.00403a0e
cmp dword [ebp - 0x1c], 0
je 0x4063ce
push dword [ebp - 0x1c]
call fcn.00443ce5
pop ecx
mov eax, edi
call fcn.004490db
ret
Function at 0x406a87
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x463798
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x479700]
xor eax, esp
mov dword [esp + 0x3c], eax
push ebx
push esi
mov eax, dword [0x479700]
xor eax, esp
push eax
lea eax, [esp + 0x50]
mov dword fs:[0], eax
lea eax, [esp + 0x30]
push eax
call fcn.0040663c
xor ebx, ebx
mov dword [esp + 0x58], ebx
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ebx
mov byte [esp + 0x58], 1
lea ecx, [esp + 0x18]
push 0x5c
push 1
mov dword [esp + 0x34], 0xf
mov dword [esp + 0x30], ebx
mov byte [esp + 0x20], bl
call fcn.00407003
lea eax, [esp + 0x18]
mov byte [esp + 0x58], 2
push ebx
push eax
lea edx, [esp + 0x14]
lea ecx, [esp + 0x38]
call fcn.00404c38
pop ecx
pop ecx
push ebx
push 1
lea ecx, [esp + 0x20]
mov esi, eax
call fcn.00403fd0
lea ecx, [esp + 0xc]
call fcn.004072fe
push ebx
push 1
lea ecx, [esp + 0x38]
call fcn.00403fd0
mov eax, esi
mov ecx, dword [esp + 0x50]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov ecx, dword [esp + 0x3c]
xor ecx, esp
call fcn.00445a5e
mov esp, ebp
pop ebp
ret
Function at 0x4096a8
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x463c99
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x479700]
xor eax, esp
mov dword [esp + 0x30], eax
push ebx
push esi
push edi
mov eax, dword [0x479700]
xor eax, esp
push eax
lea eax, [esp + 0x48]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0x14], esi
mov edi, dword [ebp + 8]
mov ebx, 0xffff
cmp bx, di
jne 0x4096f9
xor eax, eax
jmp 0x409894
mov eax, dword [esi + 0x20]
mov ecx, dword [eax]
test ecx, ecx
je 0x409725
mov edx, dword [esi + 0x30]
mov eax, dword [edx]
lea eax, [ecx + eax*2]
cmp ecx, eax
jae 0x409725
dec dword [edx]
mov ax, di
mov edx, dword [esi + 0x20]
mov esi, dword [edx]
lea ecx, [esi + 2]
mov dword [edx], ecx
mov word [esi], di
jmp 0x409894
cmp dword [esi + 0x50], 0
je 0x409891
mov ecx, esi
call fcn.0040a552
xor ecx, ecx
cmp dword [esi + 0x40], ecx
jne 0x409759
push dword [esi + 0x50]
push edi
call fcn.0044e645
pop ecx
pop ecx
cmp ax, bx
je 0x409891
movzx ebx, di
jmp 0x409891
push ecx
movzx eax, di
mov dword [esp + 0x3c], ecx
mov byte [esp + 0x2c], cl
lea ecx, [esp + 0x2c]
push 8
mov dword [esp + 0x18], eax
mov dword [esp + 0x44], 0xf
call fcn.00407003
and dword [esp + 0x50], 0
lea eax, [esi + 0x48]
mov dword [esp + 0x24], eax
mov edi, dword [esp + 0x3c]
mov esi, dword [esi + 0x40]
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x3c]
lea ecx, [esp + 0x2c]
cmp edi, 0x10
lea edx, [esp + 0x2c]
mov edi, dword [esi]
cmovae ecx, dword [esp + 0x2c]
cmovae edx, dword [esp + 0x2c]
add eax, ecx
push eax
push edx
lea eax, [esp + 0x2c]
mov ecx, esi
push eax
lea eax, [esp + 0x22]
push eax
lea eax, [esp + 0x24]
push eax
push dword [esp + 0x3c]
call dword [edi + 0x1c]
test eax, eax
js 0x409884
cmp eax, 1
jg 0x40985f
mov edi, dword [esp + 0x3c]
lea eax, [esp + 0x28]
mov ecx, dword [esp + 0x28]
cmp edi, 0x10
mov edx, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
cmovae eax, ecx
sub edx, eax
mov dword [esp + 0x1c], edx
je 0x409823
push dword [esi + 0x50]
cmp edi, 0x10
lea eax, [esp + 0x2c]
push edx
cmovae eax, ecx
push 1
push eax
call fcn.0044771c
mov edx, dword [esp + 0x2c]
add esp, 0x10
cmp edx, eax
jne 0x409857
mov edi, dword [esp + 0x3c]
lea eax, [esp + 0x10]
mov byte [esi + 0x46], 1
cmp dword [esp + 0x20], eax
jne 0x409851
test edx, edx
jne 0x40978c
cmp dword [esp + 0x38], 0x20
jae 0x40985a
push edx
push 8
lea ecx, [esp + 0x30]
call fcn.0040a16f
jmp 0x409788
mov eax, dword [ebp + 8]
movzx ebx, ax
movzx ebx, bx
movzx ebx, bx
jmp 0x409881
cmp eax, 3
jne 0x409884
mov eax, dword [esp + 0x14]
push dword [eax + 0x50]
push dword [esp + 0x14]
call fcn.0044e645
pop ecx
pop ecx
cmp ax, bx
je 0x409881
mov eax, dword [ebp + 8]
movzx ebx, ax
movzx ebx, bx
push 0
push 1
lea ecx, [esp + 0x30]
call fcn.00403fd0
mov ax, bx
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.00445a5e
mov esp, ebp
pop ebp
ret 4
Function at 0x40a38c
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x463d2f
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x479700]
xor eax, esp
mov dword [esp + 0x20], eax
push ebx
push esi
push edi
mov eax, dword [0x479700]
xor eax, esp
push eax
lea eax, [esp + 0x38]
mov dword fs:[0], eax
mov ebx, ecx
cmp dword [ebx + 0x40], 0
je 0x40a4cd
cmp byte [ebx + 0x46], 0
je 0x40a4cd
mov eax, dword [ebx]
mov esi, 0xffff
push esi
call dword [eax + 0xc]
movzx eax, ax
cmp si, ax
jne 0x40a3f3
xor al, al
jmp 0x40a4cf
xor eax, eax
mov dword [esp + 0x2c], 0xf
push eax
push 8
lea ecx, [esp + 0x20]
mov dword [esp + 0x30], eax
mov byte [esp + 0x20], al
call fcn.00407003
and dword [esp + 0x40], 0
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x2c]
cmp ecx, 0x10
lea eax, [esp + 0x14]
mov ecx, dword [ebx + 0x40]
lea edi, [esp + 0x18]
push eax
mov eax, dword [esp + 0x2c]
lea esi, [esp + 0x1c]
cmovae edi, edx
cmovae esi, edx
mov edx, dword [ecx]
add eax, edi
push eax
push esi
lea eax, [ebx + 0x48]
push eax
call dword [edx + 0x20]
sub eax, 0
je 0x40a458
dec eax
je 0x40a45c
dec eax
dec eax
je 0x40a4ba
xor bl, bl
jmp 0x40a4bc
mov byte [ebx + 0x46], 0
mov ecx, dword [esp + 0x2c]
lea eax, [esp + 0x18]
mov edx, dword [esp + 0x18]
cmp ecx, 0x10
mov esi, dword [esp + 0x14]
cmovae eax, edx
sub esi, eax
je 0x40a49b
push dword [ebx + 0x50]
cmp ecx, 0x10
lea eax, [esp + 0x1c]
push esi
cmovae eax, edx
push 1
push eax
call fcn.0044771c
add esp, 0x10
cmp esi, eax
jne 0x40a454
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x18]
cmp byte [ebx + 0x46], 0
je 0x40a4ba
test esi, esi
jne 0x40a41e
push esi
push 8
lea ecx, [esp + 0x20]
call fcn.0040a16f
jmp 0x40a416
mov bl, 1
push 0
push 1
lea ecx, [esp + 0x20]
call fcn.00403fd0
mov al, bl
jmp 0x40a4cf
mov al, 1
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.00445a5e
mov esp, ebp
pop ebp
ret
Function at 0x40f397
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
test edx, edx
jne 0x40f3a2
xor eax, eax
pop ebp
ret
push ebx
push esi
mov esi, dword [ebp + 8]
not ecx
mov ebx, 0xff
cmp esi, 8
jb 0x40f45a
push edi
mov edi, esi
shr edi, 3
movzx eax, byte [edx]
sub esi, 8
xor eax, ecx
shr ecx, 8
and eax, ebx
xor ecx, dword [eax*4 + 0x46fdd0]
movzx eax, byte [edx + 1]
xor eax, ecx
shr ecx, 8
and eax, ebx
xor ecx, dword [eax*4 + 0x46fdd0]
movzx eax, byte [edx + 2]
xor eax, ecx
shr ecx, 8
and eax, ebx
xor ecx, dword [eax*4 + 0x46fdd0]
movzx eax, byte [edx + 3]
xor eax, ecx
shr ecx, 8
and eax, ebx
xor ecx, dword [eax*4 + 0x46fdd0]
movzx eax, byte [edx + 4]
xor eax, ecx
shr ecx, 8
and eax, ebx
xor ecx, dword [eax*4 + 0x46fdd0]
movzx eax, byte [edx + 5]
xor eax, ecx
shr ecx, 8
and eax, ebx
xor ecx, dword [eax*4 + 0x46fdd0]
movzx eax, byte [edx + 6]
xor eax, ecx
shr ecx, 8
and eax, ebx
xor ecx, dword [eax*4 + 0x46fdd0]
movzx eax, byte [edx + 7]
add edx, 8
xor eax, ecx
shr ecx, 8
and eax, ebx
xor ecx, dword [eax*4 + 0x46fdd0]
dec edi
jne 0x40f3bd
pop edi
test esi, esi
je 0x40f473
movzx eax, byte [edx]
xor eax, ecx
shr ecx, 8
and eax, ebx
xor ecx, dword [eax*4 + 0x46fdd0]
inc edx
dec esi
jne 0x40f45e
not ecx
pop esi
mov eax, ecx
pop ebx
pop ebp
ret

Function at 0x40f47b
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

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

Function at 0x40fb85
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov ebx, edx
mov esi, ebx
mov eax, ecx
imul esi, dword [ebp + 8]
mov dword [ebp - 4], eax
cmp byte [edi], 0
je 0x40fbbf
push 0
lea ecx, [ebp + 8]
push ecx
push esi
push eax
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40fbba
mov byte [edi + 8], 1
mov eax, dword [ebp + 8]
jmp 0x40fbe6
mov edx, dword [edi + 0x1c]
lea eax, [edx + esi]
cmp eax, dword [edi + 0x18]
jbe 0x40fbcf
mov esi, dword [edi + 0x18]
sub esi, edx
mov ecx, dword [edi + 0x14]
push esi
add ecx, edx
push ecx
push dword [ebp - 4]
call fcn.004463a0
add esp, 0xc
mov eax, esi
add dword [edi + 0x1c], esi
pop edi
xor edx, edx
pop esi
div ebx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4107e6
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
cmp dword [esi], ebx
jne 0x41087f
cmp dword [esi + 4], 0xffffffff
jne 0x41087f
lea edi, [esi + 0x244]
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x410817
sub ecx, edx
sar ecx, 1
movzx eax, word [esi + ecx*2 + 0x242]
cmp eax, 0x5c
je 0x41084e
cmp eax, 0x2f
je 0x41084e
sub edi, 2
mov ax, word [edi + 2]
lea edi, [edi + 2]
cmp ax, bx
jne 0x41083b
mov eax, dword [0x46e7d0]
mov dword [edi], eax
lea eax, [ebp - 4]
push eax
push ecx
mov ecx, dword [ebp + 8]
call fcn.0040fa6b
pop ecx
pop ecx
test eax, eax
jne 0x410866
mov eax, dword [ebp - 4]
jmp 0x410884
mov ecx, eax
call fcn.0040fe23
xor ecx, ecx
mov dword [esi], eax
test eax, eax
mov edx, 0x200
cmove ecx, edx
mov eax, ecx
jmp 0x410884
mov eax, 0x1000000
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x4114c4
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

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

Function at 0x411536
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
push edi
mov edi, dword [ebp + 0xc]
cmp byte [esi + 0x2d], 0
je 0x4115aa
cmp dword [esi + 0x3c], 0
je 0x411568
cmp dword [esi + 0x40], edi
jae 0x411562
push dword [esi + 0x3c]
call fcn.00442fe0
and dword [esi + 0x3c], 0
pop ecx
cmp dword [esi + 0x3c], 0
jne 0x411578
lea eax, [edi + edi]
push eax
call fcn.00443007
pop ecx
mov dword [esi + 0x3c], eax
mov dword [esi + 0x40], edi
push edi
push ebx
push dword [esi + 0x3c]
call fcn.004463a0
add esp, 0xc
xor ebx, ebx
test edi, edi
je 0x4115a7
lea ecx, [esi + 0x30]
mov eax, dword [esi + 0x3c]
mov dl, byte [ebx + eax]
call fcn.0041150e
mov ecx, dword [esi + 0x3c]
mov byte [ebx + ecx], al
inc ebx
lea ecx, [esi + 0x30]
cmp ebx, edi
jb 0x41158e
mov ebx, dword [esi + 0x3c]
mov ecx, dword [esi + 0x20]
test ecx, ecx
je 0x4115d9
mov edx, dword [esi + 0x24]
lea eax, [edx + edi]
cmp eax, dword [esi + 0x28]
jb 0x4115c5
mov dword [esi + 0x14], 0x30000
jmp 0x4115fb
push edi
add ecx, edx
push ebx
push ecx
call fcn.004463a0
add esp, 0xc
mov eax, edi
add dword [esi + 0x24], edi
jmp 0x4115fd
mov eax, dword [esi + 4]
test eax, eax
je 0x4115f4
push 0
lea ecx, [ebp + 8]
push ecx
push edi
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp + 8]
jmp 0x4115fd
mov dword [esi + 0x14], 0x1000000
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret 8
Function at 0x41c2f0
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
push edi
push dword [ebp + 8]
mov edi, ecx
mov dword [edi], vtable.xldl::DownWrapper.0
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [edi + 4], eax
test eax, eax
je 0x41c3ff
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.XL_Init
push eax
call esi
push str.XL_UnInit
push dword [edi + 4]
mov dword [edi + 8], eax
call esi
push str.XL_CreateTask
push dword [edi + 4]
mov dword [edi + 0xc], eax
call esi
push str.XL_DeleteTask
push dword [edi + 4]
mov dword [edi + 0x10], eax
call esi
push str.XL_StartTask
push dword [edi + 4]
mov dword [edi + 0x14], eax
call esi
push str.XL_StopTask
push dword [edi + 4]
mov dword [edi + 0x18], eax
call esi
push str.XL_QueryTaskInfo
push dword [edi + 4]
mov dword [edi + 0x1c], eax
call esi
push str.XL_QueryTaskInfoEx
push dword [edi + 4]
mov dword [edi + 0x20], eax
call esi
push str.XL_SetSpeedLimit
push dword [edi + 4]
mov dword [edi + 0x24], eax
call esi
push str.XL_SetUploadSpeedLimit
push dword [edi + 4]
mov dword [edi + 0x28], eax
call esi
push str.XL_DelTempFile
push dword [edi + 4]
mov dword [edi + 0x2c], eax
call esi
push str.XL_SetProxy
push dword [edi + 4]
mov dword [edi + 0x30], eax
call esi
push str.XL_SetUserAgent
push dword [edi + 4]
mov dword [edi + 0x34], eax
call esi
push str.XL_GetFileSizeWithUrl
push dword [edi + 4]
mov dword [edi + 0x38], eax
call esi
push str.XL_ParseThunderPrivateUrl
push dword [edi + 4]
mov dword [edi + 0x3c], eax
call esi
push str.XL_SetAdditionInfo
push dword [edi + 4]
mov dword [edi + 0x40], eax
call esi
push str.XL_SetFileIdAndSize
push dword [edi + 4]
mov dword [edi + 0x44], eax
call esi
mov dword [edi + 0x48], eax
mov eax, edi
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
lea eax, [ebp + 8]
mov dword [ebp + 8], str.can_not_load_xldl.dll
push eax
lea ecx, [ebp - 0xc]
call fcn.004458fa
push 0x47596c
lea eax, [ebp - 0xc]
push eax
call fcn.00445a6d
int3
Function at 0x41c800
Capabilities:
Initialize winsock library

Disassembly:
push esi
mov esi, ecx
xorps xmm0, xmm0
lea eax, [esi + 0x10]
push 0
movdqu xmmword [eax], xmm0
push eax
movq qword [eax + 0x10], xmm0
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSectionAndSpinCount]
test eax, eax
jne 0x41c839
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x41c833
movzx eax, ax
or eax, 0x80070000
test eax, eax
js 0x41c8be
lea eax, [esi + 0x28]
xorps xmm0, xmm0
push 0
movdqu xmmword [eax], xmm0
push eax
movq qword [eax + 0x10], xmm0
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSectionAndSpinCount]
test eax, eax
jne 0x41c86b
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x41c869
movzx eax, ax
or eax, 0x80070000
test eax, eax
js 0x41c8c4
mov dword [esi], 1
mov dword [esi + 0xc], 0
mov dword [esi + 8], 0
mov dword [esi + 4], 0
mov dword [esi + 0x40], 0xffffffff
mov byte [esi + 0x44], 0
mov dword [esi + 0x48], 0
mov dword [esi + 0x4c], 0x2710
cmp dword [0x479248], 0
je 0x41c8ba
push 0x4790b8
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [0x479248], eax
mov eax, esi
pop esi
ret
push eax
call fcn.0041e250
push eax
call fcn.0041e250
int3

Function at 0x41cb20
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
mov esi, ecx
push edi
mov dword [esi], vtable.Downloader.0
mov byte [esi + 0x48], 1
mov eax, dword [esi + 0x14]
test eax, eax
je 0x41cb44
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 5]
lea eax, [ebp - 1]
push eax
push dword [esi + 8]
push dword [esi + 4]
call fcn.0041b810
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 8], eax
mov dword [esi + 0x88], 0
mov dword [esi + 0x8c], 0
mov dword [esi + 0x80], 0
mov dword [esi + 0x84], 0
cmp dword [esi + 0x7c], 0x10
jb 0x41cb98
push dword [esi + 0x68]
call fcn.00442fe0
add esp, 4
mov dword [esi + 0x7c], 0xf
mov dword [esi + 0x78], 0
mov byte [esi + 0x68], 0
cmp dword [esi + 0x60], 0x10
jb 0x41cbbb
push dword [esi + 0x4c]
call fcn.00442fe0
add esp, 4
mov dword [esi + 0x60], 0xf
mov dword [esi + 0x5c], 0
mov byte [esi + 0x4c], 0
push str.itdtk::thread_died_n
mov dword [esi + 0x10], vtable.itdtk::system::Thread.0
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea ecx, [esi + 0x10]
call fcn.00425bb0
cmp dword [esi + 0x3c], 0x10
jb 0x41cbf8
push dword [esi + 0x28]
call fcn.00442fe0
add esp, 4
mov dword [esi + 0x3c], 0xf
mov dword [esi + 0x38], 0
mov byte [esi + 0x28], 0
mov dword [esi + 0x10], vtable.itdtk::object::Runnable.0
mov eax, dword [esi + 4]
test eax, eax
je 0x41cc48
push dword [ebp - 5]
lea ecx, [ebp - 1]
push ecx
push dword [esi + 8]
push eax
call fcn.0041b810
push dword [esi + 4]
call fcn.00442fe0
add esp, 0x14
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
pop edi
pop esi
mov esp, ebp
pop ebp
ret