joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1002250
Capabilities:
Accept command line arguments

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
and dword [ebp - 4], 0
and dword [ebp - 8], 0
mov ecx, eax
lea eax, [ebp - 4]
push eax
push 0
lea esi, [ebp - 8]
xor eax, eax
mov dword [ebp - 0xc], ecx
call fcn.010020fc
mov esi, dword [ebp - 4]
mov eax, dword [ebp - 8]
lea eax, [eax + esi*2]
add eax, eax
push eax
call dword [sym.imp.msvcrt.dll_malloc]
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x100229d
push 0xe
pop eax
jmp 0x10022c2
mov ecx, dword [ebp - 0xc]
lea eax, [ebp - 4]
push eax
lea eax, [edi + esi*4]
push edi
lea esi, [ebp - 8]
call fcn.010020fc
mov eax, dword [ebp - 4]
pop ecx
dec eax
pop ecx
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
mov eax, dword [ebp + 0xc]
mov dword [eax], edi
xor eax, eax
pop edi
pop esi
leave
ret 8

Function at 0x10022cd
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, dword [ebp + 0x10]
xor ebx, ebx
cmp esi, 0xffffffff
jne 0x10022fe
mov eax, dword [ebp + 0xc]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x10022e7
sub eax, edx
sar eax, 1
jne 0x1002302
xor eax, eax
jmp 0x10023a3
cmp esi, ebx
jmp 0x10022f5
push dword [ebp + 8]
mov dword [ebp - 0x10], ebx
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 2
jne 0x1002344
cmp esi, 0xffffffff
jne 0x100232e
mov eax, dword [ebp + 0xc]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x100231e
sub eax, edx
sar eax, 1
jmp 0x1002330
mov eax, esi
push ebx
lea ecx, [ebp - 0x10]
push ecx
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
jmp 0x10023a3
call dword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
mov dword [ebp - 0xc], eax
cmp esi, 0xffffffff
jne 0x1002368
mov eax, dword [ebp + 0xc]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x1002358
sub eax, edx
sar eax, 1
jmp 0x100236a
mov eax, esi
mov esi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push edi
push ebx
push ebx
push ebx
push ebx
push eax
push dword [ebp + 0xc]
push ebx
push dword [ebp - 0xc]
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
call edi
cmp dword [ebp - 4], ebx
je 0x10023a2
push dword [ebp - 4]
call fcn.01001bb6
pop ecx
mov dword [ebp - 8], eax
cmp eax, ebx
jne 0x10023a9
push 0xe
pop eax
pop edi
pop esi
pop ebx
leave
ret 0xc
mov eax, dword [ebp + 0x10]
cmp eax, 0xffffffff
jne 0x10023c5
mov eax, dword [ebp + 0xc]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x10023b7
sub eax, edx
sar eax, 1
push ebx
push ebx
push dword [ebp - 4]
push dword [ebp - 8]
push eax
push dword [ebp + 0xc]
push ebx
push dword [ebp - 0xc]
call esi
mov esi, eax
call edi
cmp esi, ebx
jne 0x10023ee
push dword [ebp - 8]
mov esi, eax
call fcn.01001bd1
pop ecx
mov eax, esi
jmp 0x10023a2
push ebx
lea eax, [ebp - 0x10]
push eax
push esi
push dword [ebp - 8]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x10023df
Function at 0x1002407
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push esi
push edi
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edi, dword [ebp + 8]
mov dword [ebp - 0xc], eax
mov eax, edi
lea edx, [eax + 2]
xor esi, esi
mov cx, word [eax]
inc eax
inc eax
cmp cx, si
jne 0x1002426
sub eax, edx
sar eax, 1
jne 0x100243d
xor eax, eax
jmp 0x1002526
push dword [ebp - 0xc]
mov dword [ebp - 0x14], esi
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 2
jne 0x1002476
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, si
jne 0x1002453
push esi
sub eax, edx
lea ecx, [ebp - 0x14]
push ecx
sar eax, 1
push eax
push edi
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
jmp 0x1002526
call dword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
mov dword [ebp - 0x10], eax
mov eax, edi
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
cmp dx, si
jne 0x1002484
push ebx
push esi
push esi
push esi
push esi
sub eax, ecx
sar eax, 1
push eax
push edi
mov edi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push esi
push dword [ebp - 0x10]
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
call ebx
cmp dword [ebp - 8], esi
je 0x1002525
push dword [ebp - 8]
call fcn.01001bb6
pop ecx
mov dword [ebp - 4], eax
cmp eax, esi
jne 0x10024ca
push 0xe
pop eax
jmp 0x1002525
mov eax, dword [ebp + 8]
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
cmp dx, si
jne 0x10024d0
push esi
push esi
push dword [ebp - 8]
sub eax, ecx
push dword [ebp - 4]
sar eax, 1
push eax
push dword [ebp + 8]
push esi
push dword [ebp - 0x10]
call edi
mov edi, eax
call ebx
mov ebx, eax
cmp edi, esi
jne 0x1002506
push dword [ebp - 4]
call fcn.01001bd1
mov eax, ebx
jmp 0x1002524
push esi
lea eax, [ebp - 0x14]
push eax
push edi
push dword [ebp - 4]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 4]
mov esi, eax
call fcn.01001bd1
mov eax, esi
pop ecx
pop ebx
pop edi
pop esi
leave
ret 4
Function at 0x1002531
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push esi
push edi
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edi, dword [ebp + 8]
mov dword [ebp - 0xc], eax
mov eax, edi
lea edx, [eax + 2]
xor esi, esi
mov cx, word [eax]
inc eax
inc eax
cmp cx, si
jne 0x1002550
sub eax, edx
sar eax, 1
jne 0x1002567
xor eax, eax
jmp 0x1002650
push dword [ebp - 0xc]
mov dword [ebp - 0x14], esi
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 2
jne 0x10025a0
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, si
jne 0x100257d
push esi
sub eax, edx
lea ecx, [ebp - 0x14]
push ecx
sar eax, 1
push eax
push edi
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
jmp 0x1002650
call dword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
mov dword [ebp - 0x10], eax
mov eax, edi
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
cmp dx, si
jne 0x10025ae
push ebx
push esi
push esi
push esi
push esi
sub eax, ecx
sar eax, 1
push eax
push edi
mov edi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push esi
push dword [ebp - 0x10]
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
call ebx
cmp dword [ebp - 8], esi
je 0x100264f
push dword [ebp - 8]
call fcn.01001bb6
pop ecx
mov dword [ebp - 4], eax
cmp eax, esi
jne 0x10025f4
push 0xe
pop eax
jmp 0x100264f
mov eax, dword [ebp + 8]
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
cmp dx, si
jne 0x10025fa
push esi
push esi
push dword [ebp - 8]
sub eax, ecx
push dword [ebp - 4]
sar eax, 1
push eax
push dword [ebp + 8]
push esi
push dword [ebp - 0x10]
call edi
mov edi, eax
call ebx
mov ebx, eax
cmp edi, esi
jne 0x1002630
push dword [ebp - 4]
call fcn.01001bd1
mov eax, ebx
jmp 0x100264e
push esi
lea eax, [ebp - 0x14]
push eax
push edi
push dword [ebp - 4]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 4]
mov esi, eax
call fcn.01001bd1
mov eax, esi
pop ecx
pop ebx
pop edi
pop esi
leave
ret 4
Function at 0x100367e
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [0x1009008]
cmp eax, 0x1009008
je 0x10036aa
test byte [eax + 0x1c], 1
je 0x10036aa
push 0x1001704
push 0x92
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01001e7b
push ebx
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi]
push edi
xor edi, edi
cmp eax, edi
je 0x1003721
cmp word [eax], di
je 0x1003721
cmp dword [esi + 4], 2
jne 0x1003721
cmp dword [esi + 8], edi
jbe 0x1003721
push 0x1001778
push eax
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x10036de
push 0xfffffffffffffff4
jmp 0x10036e0
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push edi
push dword [esi + 8]
mov ebx, eax
push dword [esi + 0xc]
call dword [sym.imp.ADVAPI32.dll_IsTextUnicode]
test eax, eax
jne 0x1003710
push edi
lea eax, [ebp + 8]
push eax
push dword [esi + 8]
mov dword [ebp + 8], edi
push dword [esi + 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x1003724
mov eax, dword [esi + 8]
shr eax, 1
push eax
push dword [esi + 0xc]
push ebx
call fcn.010022cd
jmp 0x1003724
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
pop ebp
ret 4
Function at 0x10053e7
Capabilities:
Manipulate console buffer
Terminate process

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x34
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
push edi
push 0xfffffffffffffff6
pop edi
xor ebx, ebx
push edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 4], ebx
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 2
jne 0x10054e0
lea eax, [ebp - 8]
push eax
push edi
mov dword [ebp - 8], ebx
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
jne 0x1005443
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
call esi
push eax
call fcn.01005198
call esi
push eax
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov eax, dword [ebp - 8]
xor eax, 4
push eax
push edi
call esi
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
test eax, eax
je 0x100542b
xor edi, edi
inc edi
mov eax, edi
mov word [ebp - 0x34], ax
mov word [ebp - 0x2c], ax
xor eax, eax
mov word [ebp - 0x2a], ax
mov word [ebp - 0x28], ax
mov eax, edi
mov word [ebp - 0x20], ax
mov word [ebp - 0x18], ax
xor eax, eax
mov word [ebp - 0x16], ax
mov word [ebp - 0x14], ax
lea eax, [ebp - 0xc]
push eax
push 2
lea eax, [ebp - 0x34]
push eax
push 0xfffffffffffffff6
mov dword [ebp - 0x30], edi
mov byte [ebp - 0x26], 0xd
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x1c], ebx
mov byte [ebp - 0x12], 0xd
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], ebx
call esi
push eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleInputA]
cmp eax, edi
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
je 0x10054be
call edi
mov dword [ebp - 4], eax
push dword [ebp - 8]
push 0xfffffffffffffff6
call esi
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
test eax, eax
jne 0x100551e
push ebx
call edi
push eax
call fcn.01005198
call edi
jmp 0x100543c
push edi
call esi
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetStdHandle]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
xor edi, edi
inc edi
cmp eax, edi
je 0x1005504
call esi
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x134]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CancelIoEx]
cmp eax, edi
je 0x100551e
call esi
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret
Function at 0xd92058
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.00d921a8
push ebx
mov ebx, esp
push ebx
mov esi, dword [ebx + 8]
mov edi, dword [ebx + 0x10]
cld
mov dl, pe_nt_image_headers32
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
mov ebx, 2
add dl, dl
jne 0xd9207e
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0xd9206a
add dl, dl
jne 0xd92089
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0xd920dc
xor eax, eax
add dl, dl
jne 0xd92096
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0xd9217d
add dl, dl
jne 0xd920a5
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0xd920b0
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0xd920bb
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0xd920c6
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0xd920d2
push edi
mov eax, eax
sub edi, eax
mov al, byte [edi]
pop edi
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0xd92075
mov eax, 1
add dl, dl
jne 0xd920ea
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0xd920f5
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0xd920e1
sub eax, ebx
mov ebx, 1
jne 0xd92128
mov ecx, 1
add dl, dl
jne 0xd9210e
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0xd92119
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0xd92105
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0xd92075
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0xd9213f
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0xd9214a
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0xd92136
cmp eax, 0x7d00
jae 0xd9216d
cmp eax, 0x500
jb 0xd92168
inc ecx
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0xd92075
cmp eax, 0x7f
ja 0xd92170
add ecx, 2
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0xd92075
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0xd9219e
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0xd92075
pop ebx
sub edi, dword [ebx + 0x10]
mov eax, edi
pop ebx
ret 0x10
Function at 0x401000
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x40f590]
push eax
push 0x40e060
push 0x40e940
call fcn.00404aac
add esp, 0xc
lea ecx, [ebp + 0xc]
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp + 8]
push eax
push 0x40e940
call fcn.00404a7b
add esp, 0xc
mov dword [ebp - 4], 0
push 0x40e068
push 0x40e940
call fcn.00404aac
add esp, 8
push 0x40e940
call fcn.004049ca
add esp, 4
push 1
call fcn.0040492d
mov esp, ebp
pop ebp
ret

Function at 0x4018d0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0x40e150
mov eax, dword [0x40f590]
push eax
push 0x40e390
push 0x40e940
call fcn.00404aac
add esp, 0x10
call sub.netcdf.dll_nc_inq_libvers
push eax
push 0x40e3dc
push 0x40e940
call fcn.00404aac
add esp, 0xc
push 1
call fcn.0040492d
pop ebp
ret

Function at 0x40486c
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x40f378], esi
push edi
jne 0x40488c
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
cmp dword [ebp + 0xc], 0
mov al, byte [ebp + 0x10]
mov dword [0x40f374], esi
mov byte [0x40f370], al
jne 0x4048f2
mov ecx, dword [0x41094c]
test ecx, ecx
je 0x4048d3
mov eax, dword [0x410948]
sub eax, 4
cmp eax, ecx
jmp 0x4048cc
mov eax, dword [eax]
test eax, eax
je 0x4048be
call eax
mov eax, dword [0x410948]
sub eax, 4
cmp eax, dword [0x41094c]
mov dword [0x410948], eax
jae 0x4048b6
mov eax, 0x40e020
mov esi, 0x40e028
cmp eax, esi
mov edi, eax
jae 0x4048f2
mov eax, dword [edi]
test eax, eax
je 0x4048eb
call eax
add edi, 4
cmp edi, esi
jb 0x4048e3
mov eax, 0x40e02c
mov esi, 0x40e030
cmp eax, esi
mov edi, eax
jae 0x404911
mov eax, dword [edi]
test eax, eax
je 0x40490a
call eax
add edi, 4
cmp edi, esi
jb 0x404902
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x40492b
push dword [ebp + 8]
mov dword [0x40f378], 1
call fcn.004047d2
pop ebp
ret
Function at 0x405575
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x18
push 0x40c680
call fcn.00407e20
mov edi, 0x94
mov eax, edi
call fcn.00405240
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x40f338], ecx
mov eax, dword [esi + 4]
mov dword [0x40f344], eax
mov edx, dword [esi + 8]
mov dword [0x40f348], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x40f33c], esi
cmp ecx, 2
je 0x4055d5
or esi, 0x8000
mov dword [0x40f33c], esi
shl eax, 8
add eax, edx
mov dword [0x40f340], eax
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
cmp word [eax], 0x5a4d
jne 0x40560e
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40560e
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x405626
cmp eax, 0x20b
je 0x405613
mov dword [ebp - 0x1c], edi
jmp 0x40563a
cmp dword [ecx + 0x84], 0xe
jbe 0x40560e
xor eax, eax
cmp dword [ecx + 0xf8], edi
jmp 0x405634
cmp dword [ecx + 0x74], 0xe
jbe 0x40560e
xor eax, eax
cmp dword [ecx + 0xe8], edi
setne al
mov dword [ebp - 0x1c], eax
push edi
call fcn.004068c8
pop ecx
test eax, eax
jne 0x405666
cmp dword [0x40f394], 2
je 0x405653
call fcn.004082a6
push 0x1c
call fcn.0040812f
push 0xff
call fcn.004047d2
pop ecx
pop ecx
call fcn.004057f8
mov dword [ebp - 4], edi
call fcn.00406413
test eax, eax
jge 0x40567f
push 0x1b
call fcn.00405550
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x40f920], eax
call fcn.00408725
mov dword [0x40f38c], eax
call fcn.00408683
test eax, eax
jge 0x4056a5
push 8
call fcn.00405550
pop ecx
call fcn.00408450
test eax, eax
jge 0x4056b6
push 9
call fcn.00405550
pop ecx
push 1
call fcn.00404802
pop ecx
mov dword [ebp - 0x24], eax
cmp eax, edi
je 0x4056cc
push eax
call fcn.00405550
pop ecx
mov eax, dword [0x40f358]
mov dword [0x40f35c], eax
push eax
push dword [0x40f350]
push dword [0x40f34c]
call fcn.00401610
add esp, 0xc
mov esi, eax
mov dword [ebp - 0x28], esi
cmp dword [ebp - 0x1c], edi
jne 0x4056fb
push esi
call fcn.0040492d
call fcn.0040494f
jmp 0x40572d
or dword [ebp - 4], 0xffffffff
mov eax, esi
lea esp, [ebp - 0x34]
call fcn.00407e5b
ret
Function at 0x405880
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x39c]
sub esp, 0x41c
mov ecx, dword [ebp + 0x3a4]
cmp ecx, dword [0x40f804]
mov eax, dword [0x40eb80]
push ebx
push esi
mov dword [ebp + 0x398], eax
push edi
jae 0x405a46
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x40f820]
mov eax, dword [ebx]
mov esi, ecx
and esi, 0x1f
shl esi, 3
mov al, byte [eax + esi + 4]
test al, 1
mov dword [ebp - 0x80], ebx
je 0x405a46
xor edi, edi
cmp dword [ebp + 0x3ac], edi
mov dword [ebp - 0x74], edi
mov dword [ebp - 0x7c], edi
jne 0x4058ea
xor eax, eax
jmp 0x405a5a
test al, 0x20
je 0x4058fb
push 2
push edi
push edi
push ecx
call fcn.00408a40
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x4059d0
cmp dword [ebp + 0x3ac], edi
mov eax, dword [ebp + 0x3a8]
mov dword [ebp - 0x70], eax
mov dword [ebp + 0x3a4], edi
jbe 0x405a17
mov ecx, dword [ebp - 0x70]
sub ecx, dword [ebp + 0x3a8]
lea eax, [ebp - 0x6c]
cmp ecx, dword [ebp + 0x3ac]
jae 0x40595d
mov edx, dword [ebp - 0x70]
inc dword [ebp - 0x70]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x40594e
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc edi
mov ebx, dword [ebp - 0x80]
mov byte [eax], dl
inc eax
inc edi
cmp edi, 0x400
jl 0x405930
mov edi, eax
lea eax, [ebp - 0x6c]
sub edi, eax
push 0
lea eax, [ebp - 0x78]
push eax
push edi
lea eax, [ebp - 0x6c]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40599d
mov eax, dword [ebp - 0x78]
add dword [ebp - 0x74], eax
cmp eax, edi
jl 0x4059a9
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp + 0x3a8]
xor edi, edi
cmp eax, dword [ebp + 0x3ac]
jb 0x405924
jmp 0x4059ab
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
xor edi, edi
mov eax, dword [ebp - 0x74]
cmp eax, edi
jne 0x405a41
cmp dword [ebp + 0x3a4], edi
je 0x405a17
push 5
pop eax
cmp dword [ebp + 0x3a4], eax
jne 0x405a09
mov dword [0x40f330], eax
jmp 0x405a4d
push edi
lea ecx, [ebp - 0x78]
push ecx
push dword [ebp + 0x3ac]
push dword [ebp + 0x3a8]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4059fb
mov eax, dword [ebp - 0x78]
mov dword [ebp + 0x3a4], edi
mov dword [ebp - 0x74], eax
jmp 0x4059ab
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
jmp 0x4059ab
push dword [ebp + 0x3a4]
call fcn.004089e1
pop ecx
jmp 0x405a57
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x405a2f
mov eax, dword [ebp + 0x3a8]
cmp byte [eax], 0x1a
je 0x4058e3
mov dword [0x40f32c], 0x1c
mov dword [0x40f330], edi
jmp 0x405a57
sub eax, dword [ebp - 0x7c]
jmp 0x405a5a
and dword [0x40f330], 0
mov dword [0x40f32c], 9
or eax, 0xffffffff
mov ecx, dword [ebp + 0x398]
pop edi
pop esi
pop ebx
call fcn.00405232
add ebp, 0x39c
leave
ret
Function at 0x40812f
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x40eb80]
mov ecx, dword [ebp + 0x94]
push ebx
push esi
mov dword [ebp + 0x88], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x40ebf0]
je 0x408164
inc eax
cmp eax, 0x13
jb 0x408155
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x40ebf0]
jne 0x40828a
mov eax, dword [0x40f394]
cmp eax, 1
je 0x408262
cmp eax, edx
jne 0x408194
cmp dword [0x40ebb8], 1
je 0x408262
cmp ecx, 0xfc
je 0x40828a
push 0x104
lea eax, [ebp - 0x80]
push eax
push edx
mov byte [ebp + 0x84], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4081ca
lea eax, [ebp - 0x80]
push 0x40c7d4
push eax
call fcn.00405280
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00404be0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x4081fe
mov eax, edi
push eax
call fcn.00404be0
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x40c7d0
push edi
call fcn.00409f80
add esp, 0x10
push edi
call fcn.00404be0
push dword [esi + 0x40ebf4]
mov ebx, eax
call fcn.00404be0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00405240
mov ebx, esp
push 0x40cd48
push ebx
call fcn.00405280
push edi
push ebx
call fcn.00405290
push 0x40c7cc
push ebx
call fcn.00405290
push dword [esi + 0x40ebf4]
push ebx
call fcn.00405290
push 0x12010
push 0x40c798
push ebx
call fcn.00409e80
add esp, 0x2c
jmp 0x40828a
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x40ebf4]
push dword [esi]
call fcn.00404be0
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x8c]
mov ecx, dword [ebp + 0x88]
call fcn.00405232
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret