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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x5150b8]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x4189cb
cmp word [ebx], dx
jne 0x4189cb
or byte [eax + edi + 0x28], 4
jmp 0x4189d0
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x418b33
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x418b13
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x418a11
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x418a47
cmp eax, edx
jae 0x418a55
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x4189ec
jmp 0x418b33
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x418b0e
cmp dword [ebp - 0x18], 0
je 0x418b0e
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x5150b8]
test byte [eax + edi + 0x28], 0x48
je 0x418ae4
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x418aa8
mov word [esi], cx
jmp 0x418adf
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x5150b8]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x5150b8]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x5150b8]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x418b33
pop eax
cmp word [ebp - 4], ax
jne 0x418af4
cmp esi, ebx
jne 0x418af4
mov word [esi], ax
jmp 0x418b30
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.004193bf
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x418b33
push 0xd
pop eax
jmp 0x418aef
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x5150b8]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x418b2d
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x418b33
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x41cce5
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [0x433064]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x25c], ecx
cmp edx, edi
je 0x41cd30
movzx eax, word [edx]
lea ecx, [ebp - 0x255]
push eax
call fcn.0041ce80
test al, al
jne 0x41cd2a
sub edx, 2
cmp edx, edi
jne 0x41cd10
mov ecx, dword [ebp - 0x25c]
movzx esi, word [edx]
cmp esi, 0x3a
jne 0x41cd52
lea eax, [edi + 2]
cmp edx, eax
je 0x41cd52
push ecx
xor ebx, ebx
push ebx
push ebx
push edi
call fcn.0041cc31
add esp, 0x10
jmp 0x41ce4c
push esi
lea ecx, [ebp - 0x255]
call fcn.0041ce80
sub edx, edi
movzx eax, al
sar edx, 1
inc edx
neg eax
sbb eax, eax
xor ebx, ebx
push ebx
push ebx
and eax, edx
push ebx
mov dword [ebp - 0x260], eax
lea eax, [ebp - 0x254]
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x41cd95
push dword [ebp - 0x25c]
jmp 0x41cd42
mov ebx, dword [ebp - 0x25c]
push 0x2e
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
sar eax, 2
mov dword [ebp - 0x25c], eax
pop eax
cmp word [ebp - 0x228], ax
jne 0x41cdd2
cmp word [ebp - 0x226], 0
je 0x41cdf3
cmp word [ebp - 0x226], ax
jne 0x41cdd2
cmp word [ebp - 0x224], 0
je 0x41cdf3
push ebx
push dword [ebp - 0x260]
lea eax, [ebp - 0x228]
push edi
push eax
call fcn.0041cc31
add esp, 0x10
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x41ce3f
lea eax, [ebp - 0x254]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0x2e
test eax, eax
pop eax
jne 0x41cdac
mov eax, dword [ebx + 4]
mov edx, dword [ebx]
sub eax, edx
mov ecx, dword [ebp - 0x25c]
sar eax, 2
cmp ecx, eax
jne 0x41ce27
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x41ce4c
push 0x41ca61
sub eax, ecx
push 4
push eax
lea eax, [edx + ecx*4]
push eax
call fcn.00422670
add esp, 0x10
jmp 0x41ce1c
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x264]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040a8fe
leave
ret
Function at 0x41d762
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x41d7ff
push ebx
push esi
call fcn.0041d72b
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.0041c878
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x41d7ac
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x41d7fe
push edi
push eax
call fcn.00417291
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x41d7cc
call fcn.00416ead
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x41d7fd
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.0041c878
add esp, 0x20
test eax, eax
jne 0x41d7eb
push edi
call fcn.00416ead
jmp 0x41d7f3
push ebx
call fcn.00416ead
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x41d802
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x41d813
pop esi
ret
push ebx
push edi
push esi
call fcn.0041d72b
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.00417291
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x41d83b
push ebx
push esi
push edi
call fcn.0040bd30
add esp, 0xc
push 0
call fcn.00416ead
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x41df95
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0041dab0

Function at 0x420399
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
call fcn.00415c1b
mov esi, dword [ebp + 8]
mov edi, eax
push 2
lea eax, [ebp - 4]
mov ecx, esi
push eax
and ecx, 0x3ff
push 0x20000001
or ecx, 0x400
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x420408
cmp esi, dword [ebp - 4]
je 0x420403
cmp dword [ebp + 0xc], 0
je 0x420403
mov esi, dword [edi + 0x50]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x4203e0
push dword [edi + 0x50]
sub esi, ecx
sar esi, 1
call fcn.0041feeb
pop ecx
xor ecx, ecx
cmp eax, esi
setne cl
mov eax, ecx
jmp 0x42040a
xor eax, eax
inc eax
jmp 0x42040a
xor eax, eax
pop edi
pop esi
leave
ret
Function at 0x42046f
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x433064]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x18], eax
call fcn.00415c1b
add eax, 0x50
lea edi, [ebp - 0x10]
mov dword [ebp - 0x14], eax
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.00415c1b
lea ecx, [ebp - 0x10]
xor edx, edx
mov dword [eax + 0x34c], ecx
lea ecx, [esi + 0x80]
mov eax, dword [ebp - 0x14]
mov dword [eax], esi
lea edi, [eax + 4]
mov dword [edi], ecx
test ecx, ecx
je 0x4204e6
cmp word [ecx], dx
je 0x4204e6
mov eax, dword [0x428be4]
push edi
dec eax
push eax
push 0x428ad0
call fcn.0042040e
mov eax, dword [ebp - 0x14]
add esp, 0xc
xor edx, edx
mov dword [ebp - 0x10], edx
mov eax, dword [eax]
test eax, eax
je 0x420559
cmp word [eax], dx
je 0x420559
mov eax, dword [edi]
test eax, eax
je 0x42050a
cmp word [eax], dx
je 0x42050a
lea eax, [ebp - 0x10]
push eax
call fcn.0041fdf1
jmp 0x420513
lea eax, [ebp - 0x10]
push eax
call fcn.0041fe8c
cmp dword [ebp - 0x10], 0
pop ecx
jne 0x420583
mov eax, dword [0x428acc]
push dword [ebp - 0x14]
dec eax
push eax
push 0x4287c0
call fcn.0042040e
add esp, 0xc
test al, al
je 0x420583
mov eax, dword [edi]
xor edi, edi
test eax, eax
je 0x42054e
cmp word [eax], di
je 0x42054e
lea eax, [ebp - 0x10]
push eax
call fcn.0041fdf1
pop ecx
jmp 0x420585
lea eax, [ebp - 0x10]
push eax
call fcn.0041fe8c
jmp 0x42054b
mov eax, dword [edi]
test eax, eax
je 0x420570
cmp word [eax], dx
je 0x420570
lea eax, [ebp - 0x10]
push eax
call fcn.0041fda6
pop ecx
jmp 0x420583
mov dword [ebp - 0x10], 0x104
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
xor edi, edi
cmp dword [ebp - 0x10], 0
je 0x42064e
lea eax, [ebp - 0x10]
push eax
lea eax, [esi + 0x100]
neg esi
sbb esi, esi
and esi, eax
push esi
call fcn.00420293
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x42064e
movzx ecx, si
push ecx
call dword [sym.imp.KERNEL32.dll_IsValidCodePage]
test eax, eax
je 0x42064e
push 1
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_IsValidLocale]
test eax, eax
je 0x42064e
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x4205db
mov dword [eax], esi
mov eax, dword [ebp - 0x14]
push edi
push 0x55
add eax, 0x250
push eax
push dword [ebp - 0xc]
call fcn.004179d8
test ebx, ebx
je 0x420649
push edi
push 0x55
lea eax, [ebx + 0x120]
push eax
push dword [ebp - 0xc]
call fcn.004179d8
push 0x40
push ebx
push 0x1001
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x42064e
push 0x40
lea eax, [ebx + 0x80]
push eax
push 0x1002
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x42064e
push 0xa
push 0x10
lea ecx, [ebx + 0x100]
push ecx
push esi
call fcn.00422d72
add esp, 0x10
xor eax, eax
inc eax
jmp 0x420650
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040a8fe
leave
ret
Function at 0x4231cf
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
push dword [ebp + 0xc]
push ebx
call fcn.0042314b
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x42333e
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x42333e
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x4232f3
jg 0x42322b
test eax, eax
je 0x4232e9
push 1
push 0x1000
call fcn.00417cf3
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x42324e
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x4232e0
push 0x8000
push ebx
call fcn.004131bb
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x423277
jg 0x423272
cmp ecx, 0x1000
jb 0x423277
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.00416c91
add esp, 0x10
cmp eax, 0xffffffff
je 0x4232bc
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x423272
jl 0x4232a3
test ecx, ecx
jne 0x423264
push dword [ebp - 0xc]
push ebx
call fcn.004131bb
push esi
call fcn.00416ead
add esp, 0xc
xor ebx, ebx
jmp 0x42334c
cmp byte [edi + 0x24], 0
je 0x4232d3
cmp dword [edi + 0x20], 5
jne 0x4232d3
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x4232de
mov ebx, dword [edi + 0x18]
jmp 0x4232e0
xor ebx, ebx
push esi
call fcn.00416ead
pop ecx
jmp 0x42334c
test ecx, ecx
jg 0x4232b5
jl 0x4232f3
test eax, eax
jae 0x4232b5
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.004193bf
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x423313
cmp byte [edi + 0x1c], 0
je 0x4232b5
jmp 0x423344
push ebx
call fcn.0041e36a
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x4232b5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [edi + 0x24], 1
mov dword [edi + 0x20], eax
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x42334c
cmp byte [edi + 0x1c], 0
je 0x423349
mov ebx, dword [edi + 0x18]
jmp 0x42334c
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.004193bf
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x423a40
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x423a6d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x423a6d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x401660
Capabilities:
Initialize winsock library
Resolve dns

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1bc
mov eax, dword [0x409008]
xor eax, esp
mov dword [esp + 0x1b8], eax
push esi
lea eax, [esp + 0x28]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov esi, eax
test esi, esi
je 0x4016b0
mov ecx, str.WSAStartup_ha_fallado
call fcn.00401c20
mov eax, esi
pop esi
mov ecx, dword [esp + 0x1b8]
xor ecx, esp
call fcn.00404268
mov esp, ebp
pop ebp
ret
lea eax, [esp + 4]
mov dword [esp + 4], 0
push eax
lea eax, [esp + 0xc]
mov dword [esp + 0x10], 2
push eax
xorps xmm0, xmm0
mov dword [esp + 0x18], 1
push str.1169
push 0
movlpd qword [esp + 0x28], xmm0
movlpd qword [esp + 0x30], xmm0
mov dword [esp + 0x24], 6
mov dword [esp + 0x18], 1
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov esi, eax
test esi, esi
je 0x401729
mov ecx, str.getaddrinfo_ha_fallado
call fcn.00401c20
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, esi
pop esi
mov ecx, dword [esp + 0x1b8]
xor ecx, esp
call fcn.00404268
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 4]
push dword [eax + 0xc]
push dword [eax + 8]
push dword [eax + 4]
call dword [sym.imp.WS2_32.dll_socket]
mov ecx, eax
mov dword [0x409018], ecx
cmp ecx, 0xffffffff
jne 0x40177b
mov ecx, str.Fallo_al_crear_el_socket
call fcn.00401c20
push dword [esp + 4]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 1
pop esi
mov ecx, dword [esp + 0x1b8]
xor ecx, esp
call fcn.00404268
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 4]
push dword [eax + 0x10]
push dword [eax + 0x18]
push ecx
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x4017cf
mov ecx, str.Bind_ha_fallado
call fcn.00401c20
push dword [esp + 4]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
push dword [0x409018]
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 1
pop esi
mov ecx, dword [esp + 0x1b8]
xor ecx, esp
call fcn.00404268
mov esp, ebp
pop ebp
ret
push dword [esp + 4]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
push bind
push dword [0x409018]
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x4017fb
mov ecx, str.Listen_ha_fallado
call fcn.00401c20
jmp 0x4017a5
mov ecx, dword [esp + 0x1bc]
xor eax, eax
pop esi
xor ecx, esp
call fcn.00404268
mov esp, ebp
pop ebp
ret
Function at 0x402b00
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
push ebx
mov ebx, ecx
push esi
push edi
cmp dword [ebx + 0x38], 0
je 0x402b2c
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const___long_long___int64__]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x20]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x20], esi
mov ecx, dword [eax]
lea eax, [ebx + 0x30]
mov dword [esp + 0x24], edi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
test ecx, ecx
je 0x402b54
mov eax, dword [eax]
mov ecx, dword [eax]
jmp 0x402b5a
xor ecx, ecx
mov dword [esp + 0x18], eax
mov eax, ecx
cdq
mov dword [esp + 0x10], eax
mov ecx, edx
mov dword [esp + 0x14], ecx
test edi, edi
jl 0x402bc2
jg 0x402b71
test esi, esi
je 0x402bc2
test ecx, ecx
jl 0x402bbd
jg 0x402b7b
test eax, eax
je 0x402bbd
cmp edi, ecx
jg 0x402b8f
jl 0x402b85
cmp esi, eax
jae 0x402b8f
mov eax, esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], edi
push eax
push dword [ebp + 8]
push dword [esp + 0x24]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esp + 0x24]
add esp, 0xc
mov edx, dword [esp + 0x10]
mov ecx, dword [ebp + 8]
add ecx, edx
sub esi, edx
mov eax, dword [eax]
sbb edi, dword [esp + 0x14]
sub dword [eax], edx
mov eax, dword [ebx + 0x20]
add dword [eax], edx
jmp 0x402bc5
mov ecx, dword [ebp + 8]
jmp 0x402bcf
mov ecx, dword [ebp + 8]
test edi, edi
jl 0x402be9
jg 0x402bcf
test esi, esi
je 0x402be9
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x402be9
push eax
push esi
push 1
push ecx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x402c00
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 4], esi
test eax, eax
jg 0x402c2c
jl 0x402c20
test ecx, ecx
jne 0x402c2c
pop esi
xor eax, eax
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x402c45
push eax
push ecx
push esi
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char___long_long___int64__]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x1c]
push edi
mov edi, ecx
mov eax, dword [eax]
mov dword [ebp - 8], eax
test eax, eax
je 0x402c93
mov eax, dword [ebx + 0x2c]
lea edx, [ebx + 0x2c]
mov dword [ebp - 0xc], edx
mov eax, dword [eax]
test eax, eax
je 0x402c99
mov edi, dword [ebp - 4]
cmp eax, ecx
mov esi, ecx
cmovb esi, eax
push esi
push dword [ebp - 8]
push edi
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebx + 0x2c]
add edi, esi
mov dword [ebp - 4], edi
add esp, 0xc
mov edi, dword [ebp + 0xc]
sub edi, esi
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
mov esi, dword [ebp - 4]
jmp 0x402c99
lea eax, [ebx + 0x2c]
mov dword [ebp - 0xc], eax
cmp dword [ebx + 0x4c], 0
je 0x402d06
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x402cc2
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 0x54]
mov ecx, dword [ebx + 0x50]
sub edx, ecx
mov dword [eax], ecx
mov eax, dword [ebx + 0x1c]
mov dword [eax], ecx
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
mov dword [eax], edx
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
cmp edi, 0xfff
jbe 0x402cf4
nop
push dword [ebx + 0x4c]
push 0xfff
push 1
push esi
call eax
add esp, 0x10
add esi, eax
sub edi, eax
cmp eax, 0xfff
jne 0x402d06
cmp edi, eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
ja 0x402cd0
test edi, edi
je 0x402d06
push dword [ebx + 0x4c]
push edi
push 1
push esi
call eax
add esp, 0x10
sub edi, eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, edi
pop edi
pop esi
sbb edx, 0
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x403080
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x409008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x4030b0
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00404268
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
push edi
mov ecx, dword [eax]
test ecx, ecx
je 0x4030ec
mov edx, dword [esi + 0x30]
mov edi, dword [edx]
lea eax, [edi + ecx]
cmp ecx, eax
jae 0x4030ec
lea ecx, [edi - 1]
mov eax, ebx
mov dword [edx], ecx
mov edx, dword [esi + 0x20]
pop edi
mov esi, dword [edx]
lea ecx, [esi + 1]
mov dword [edx], ecx
mov byte [esi], bl
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00404268
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
je 0x4031c3
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x403114
mov edx, dword [esi + 0x54]
mov ecx, dword [esi + 0x50]
sub edx, ecx
mov dword [edi], ecx
mov eax, dword [esi + 0x1c]
mov dword [eax], ecx
mov eax, dword [esi + 0x2c]
mov dword [eax], edx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x403120
movsx eax, bl
jmp 0x403158
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x25], bl
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x25]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet___char_const___char_const___char_const____char___char___char___const]
sub eax, 0
je 0x403182
sub eax, 1
je 0x403182
sub eax, 2
jne 0x4031c3
movsx eax, byte [ebp - 0x25]
push dword [esi + 0x4c]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmove ebx, ecx
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00404268
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x4031a0
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x4031c3
lea ecx, [ebp - 0x25]
mov byte [esi + 0x3d], 1
or eax, 0xffffffff
cmp dword [ebp - 0x30], ecx
pop edi
pop esi
cmovne eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00404268
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00404268
mov esp, ebp
pop ebp
ret 4