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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x40f1a4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push 0
push 0x8000
push eax
call dword [sym.imp.MSVCR120.dll__open]
mov ebx, eax
add esp, 0xc
test ebx, ebx
js 0x403a77
lea eax, [ebp - 0x28]
push eax
push ebx
call dword [sym.imp.MSVCR120.dll__fstat32]
add esp, 8
test eax, eax
jns 0x403a88
push ebx
call dword [sym.imp.MSVCR120.dll__close]
add esp, 4
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00409cf2
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x14]
test eax, eax
jne 0x403ab5
push ebx
call dword [sym.imp.MSVCR120.dll__close]
push 4
call fcn.00405e20
add esp, 8
mov dword [eax], 0
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00409cf2
mov esp, ebp
pop ebp
ret
push esi
inc eax
push edi
push eax
call fcn.00405e20
mov ecx, dword [ebp - 0x14]
mov esi, eax
inc ecx
mov dword [ebp - 0x38], esi
push ecx
push esi
push ebx
call dword [sym.imp.MSVCR120.dll__read]
mov edi, eax
push ebx
mov dword [ebp - 0x3c], edi
call dword [sym.imp.MSVCR120.dll__close]
add esp, 0x14
cmp edi, dword [ebp - 0x14]
je 0x403b01
push esi
call dword [sym.imp.MSVCR120.dll_free]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00409cf2
mov esp, ebp
pop ebp
ret
xor ecx, ecx
xor eax, eax
test edi, edi
jle 0x403b1c
lea esp, [esp]
cmp byte [eax + esi], 0xa
jne 0x403b17
inc ecx
inc eax
cmp eax, edi
jl 0x403b10
lea eax, [ecx*4 + 4]
push eax
call fcn.00405e20
mov ecx, eax
add esp, 4
xor eax, eax
mov dword [ebp - 0x2c], ecx
mov edx, esi
mov dword [ebp - 0x34], eax
xor ebx, ebx
mov dword [ebp - 0x30], edx
test edi, edi
jle 0x403b8c
cmp byte [ebx + esi], 0xa
jne 0x403b87
mov eax, ebx
lea edi, [esi + 1]
sub eax, edx
add edi, eax
lea eax, [edi + 1]
push eax
call fcn.00405e20
push edi
push dword [ebp - 0x30]
mov esi, eax
push esi
call sub.MSVCR120.dll_memcpy
mov eax, dword [ebp - 0x34]
add esp, 0x10
mov ecx, dword [ebp - 0x2c]
mov byte [esi + edi], 0
mov edi, dword [ebp - 0x3c]
mov dword [ecx + eax*4], esi
inc eax
mov esi, dword [ebp - 0x38]
mov dword [ebp - 0x34], eax
lea edx, [esi + 1]
add edx, ebx
mov dword [ebp - 0x30], edx
inc ebx
cmp ebx, edi
jl 0x403b41
push esi
mov dword [ecx + eax*4], 0
call dword [sym.imp.MSVCR120.dll_free]
mov ecx, dword [ebp - 4]
add esp, 4
mov eax, dword [ebp - 0x2c]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.00409cf2
mov esp, ebp
pop ebp
ret
Function at 0x403c00
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x414
mov eax, dword [0x40f1a4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x40f1e0]
test eax, eax
je 0x403c4f
push eax
push 0x40b420
push dword [0x40f1dc]
lea eax, [ebp - 0x404]
push dword [0x40f1d8]
push dword [0x40f1e4]
push str.CMD__C____s___s_s_____s_______s__2_1_
push 0x400
push eax
call fcn.00407450
add esp, 0x20
jmp 0x403c7f
push 0x40b420
push dword [0x40f1dc]
lea eax, [ebp - 0x404]
push dword [0x40f1d8]
push dword [0x40f1e4]
push str.CMD__C____s___s_s_____s__2_1_
push 0x400
push eax
call fcn.00407450
add esp, 0x1c
push 0
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x404]
push eax
call fcn.00402f00
add esp, 0xc
test eax, eax
jne 0x403cc6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [0x40f200]
push str._s:_could_not_start_server:_error_code__lu_n
call sub.libintl_8.dll_libintl_gettext
add esp, 4
push eax
call fcn.00401020
add esp, 0xc
push 1
call dword [sym.imp.MSVCR120.dll_exit]
mov eax, dword [ebp - 0x414]
push dword [ebp - 0x410]
mov dword [0x410a28], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x40c]
xor ecx, ebp
call fcn.00409cf2
mov esp, ebp
pop ebp
ret

Function at 0x403d00
Capabilities:
Terminate process

Disassembly:
cmp dword [0x40f1dc], 0
jne 0x403dc5
cmp dword [0x40f1cc], 4
mov dword [0x40f1dc], 0x40b57e
jne 0x403dc5
push esi
push edi
push 0x40f208
call fcn.00403a30
mov esi, eax
add esp, 4
test esi, esi
jne 0x403d62
push 0x40f208
push dword [0x40f200]
push str._s:_could_not_read_file___s__n
call sub.libintl_8.dll_libintl_gettext
add esp, 4
push eax
call fcn.00401020
add esp, 0xc
push 1
call dword [sym.imp.MSVCR120.dll_exit]
mov edi, dword [esi]
test edi, edi
je 0x403dc6
cmp dword [esi + 4], 0
jne 0x403dc6
push 0x40b5d4
push edi
call dword [sym.imp.MSVCR120.dll_strcspn]
push 0x40b5d8
push edi
mov byte [eax + edi], 0
call dword [sym.imp.MSVCR120.dll_strstr]
add esp, 0x10
test eax, eax
je 0x403da3
mov byte [eax], 0
inc eax
push eax
call fcn.00405dd0
add esp, 4
mov dword [0x40f1dc], eax
cmp dword [0x40f1e4], 0
jne 0x403dba
push edi
call fcn.00405dd0
add esp, 4
mov dword [0x40f1e4], eax
push esi
call fcn.00403bc0
add esp, 4
pop edi
pop esi
ret
push 0x40f208
push dword [0x40f200]
push str._s:_option_file___s__must_have_exactly_one_line_n
jmp 0x403d49
Function at 0x404250
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x408
mov eax, dword [0x40f1a4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 0xc]
push 0x400
mov dword [ebp - 0x408], eax
call fcn.00405e20
mov ebx, eax
push ebx
push esi
push edi
push dword [ebp - 0x408]
call fcn.004055c0
mov esi, eax
add esp, 0x14
test esi, esi
jns 0x40430b
lea eax, [ebp - 0x404]
push eax
push dword [ebp - 0x408]
call fcn.00405280
add esp, 8
test eax, eax
jns 0x4042cb
push 0x400
push dword [0x40f200]
lea eax, [ebp - 0x404]
push eax
call fcn.00409440
add esp, 0xc
lea eax, [ebp - 0x404]
cmp esi, 0xffffffff
jne 0x4042e5
push eax
push dword [0x40f200]
push edi
push str.The_program___s__is_needed_by__s_but_was_not_found_in_the_nsame_directory_as___s_._nCheck_your_installation._n
jmp 0x4042f2
push dword [0x40f200]
push eax
push edi
push str.The_program___s__was_found_by___s__nbut_was_not_the_same_version_as__s._nCheck_your_installation._n
call sub.libintl_8.dll_libintl_gettext
add esp, 4
push eax
call fcn.00401020
add esp, 0x10
push 1
call dword [sym.imp.MSVCR120.dll_exit]
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00409cf2
mov esp, ebp
pop ebp
ret

Function at 0x404320
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
mov ecx, 0x40cec0
mov eax, esi
mov edi, edi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x404350
test dl, dl
je 0x40434c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x404350
add eax, 2
add ecx, 2
test dl, dl
jne 0x404330
xor eax, eax
jmp 0x404355
sbb eax, eax
or eax, 1
test eax, eax
je 0x404428
mov ecx, str.auto
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x404384
test dl, dl
je 0x404380
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x404384
add eax, 2
add ecx, 2
test dl, dl
jne 0x404364
xor eax, eax
jmp 0x404389
sbb eax, eax
or eax, 1
test eax, eax
je 0x404428
mov ecx, 0x40cecc
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4043b8
test dl, dl
je 0x4043b4
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4043b8
add eax, 2
add ecx, 2
test dl, dl
jne 0x404398
xor eax, eax
jmp 0x4043bd
sbb eax, eax
or eax, 1
test eax, eax
je 0x40441b
mov ecx, str.demand
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4043e8
test dl, dl
je 0x4043e4
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4043e8
add eax, 2
add ecx, 2
test dl, dl
jne 0x4043c8
xor eax, eax
jmp 0x4043ed
sbb eax, eax
or eax, 1
test eax, eax
je 0x40441b
push esi
push dword [0x40f200]
push str._s:_unrecognized_start_type___s__n
call sub.libintl_8.dll_libintl_gettext
add esp, 4
push eax
call fcn.00401020
add esp, 0xc
call fcn.00401100
push 1
call dword [sym.imp.MSVCR120.dll_exit]
mov dword [0x40f018], 3
pop esi
pop ebp
ret
mov dword [0x40f018], 2
pop esi
pop ebp
ret
Function at 0x405120
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc14
mov eax, dword [0x40f1a4]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 0xc]
mov eax, str.postgres_9.5
push edi
mov edi, dword [ebp + 8]
mov ecx, esi
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x405162
test dl, dl
je 0x40515e
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x405162
add ecx, 2
add eax, 2
test dl, dl
jne 0x405142
xor eax, eax
jmp 0x405167
sbb eax, eax
or eax, 1
test eax, eax
je 0x40517a
push 0x40b57e
push 0
call fcn.00409920
add esp, 8
lea eax, [ebp - 0xc14]
push eax
push edi
call fcn.00405280
add esp, 8
test eax, eax
js 0x405269
lea eax, [ebp - 0x814]
push eax
lea eax, [ebp - 0xc14]
push eax
call fcn.00406da0
lea eax, [ebp - 0x814]
push eax
push esi
call sub.libintl_8.dll_libintl_bindtextdomain
push esi
call sub.libintl_8.dll_libintl_textdomain
mov esi, dword [sym.imp.MSVCR120.dll_getenv]
push str.PGLOCALEDIR
call esi
mov edi, dword [sym.imp.MSVCR120.dll__strdup]
add esp, 0x18
test eax, eax
jne 0x40520d
lea eax, [ebp - 0x814]
push eax
push str.PGLOCALEDIR_s
lea eax, [ebp - 0x414]
push 0x40e
push eax
call fcn.00407450
lea eax, [ebp - 0x408]
push eax
call fcn.004065c0
lea eax, [ebp - 0x414]
push eax
call edi
push eax
call fcn.00406300
add esp, 0x1c
push str.PGSYSCONFDIR
call esi
add esp, 4
test eax, eax
jne 0x405269
lea eax, [ebp - 0x814]
push eax
lea eax, [ebp - 0xc14]
push eax
call fcn.00406ce0
lea eax, [ebp - 0x814]
push eax
push str.PGSYSCONFDIR_s
lea eax, [ebp - 0x414]
push 0x40e
push eax
call fcn.00407450
lea eax, [ebp - 0x407]
push eax
call fcn.004065c0
lea eax, [ebp - 0x414]
push eax
call edi
push eax
call fcn.00406300
add esp, 0x24
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00409cf2
mov esp, ebp
pop ebp
ret
Function at 0x405b20
Capabilities:
Create pipe
Create process on windows
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x70
push edi
xor edi, edi
mov dword [ebp - 0x1c], 0xc
push edi
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x14], 1
push eax
lea eax, [ebp - 8]
mov dword [ebp - 0x18], edi
push eax
lea eax, [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
jne 0x405b56
pop edi
mov esp, ebp
pop ebp
ret
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea eax, [ebp - 0xc]
push 2
push 0
push 0
push eax
call esi
push eax
push dword [ebp - 4]
call esi
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
jne 0x405b92
push dword [ebp - 4]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 8]
call esi
pop esi
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret
push ebx
push dword [ebp - 4]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
call ebx
push 0x44
lea eax, [ebp - 0x70]
xorps xmm0, xmm0
push 0
push eax
movdqu xmmword [ebp - 0x2c], xmm0
call sub.MSVCR120.dll_memset
mov eax, dword [ebp - 8]
add esp, 0xc
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x70], 0x44
push eax
lea eax, [ebp - 0x70]
mov dword [ebp - 0x44], pe_nt_image_headers32
push eax
push 0
push 0
push 0
push 1
push 0
push 0
push dword [ebp + 8]
mov dword [ebp - 0x38], 0xffffffff
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x405cfd
mov ebx, dword [ebp + 0x10]
mov esi, dword [ebp + 0xc]
push ebx
push 0
push esi
call sub.MSVCR120.dll_memset
dec ebx
add esp, 0xc
add ebx, esi
mov edi, esi
cmp esi, ebx
jae 0x405ceb
lea ebx, [ebx]
push 0x2710
push dword [ebp - 0xc]
mov dword [ebp - 0x10], 0
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x405c85
push eax
lea eax, [ebp - 0x10]
push eax
mov eax, esi
sub eax, edi
add eax, dword [ebp + 0x10]
push eax
push edi
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x405c85
mov ecx, edi
lea edx, [ecx + 1]
lea esp, [esp]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405c60
sub ecx, edx
add edi, ecx
cmp dword [ebp - 0x10], 0
je 0x405c85
push 0xa
push esi
call dword [sym.imp.MSVCR120.dll_strchr]
add esp, 8
test eax, eax
jne 0x405c85
cmp edi, ebx
jb 0x405c20
cmp edi, esi
je 0x405ceb
push 0xa
push esi
call dword [sym.imp.MSVCR120.dll_strchr]
add esp, 8
test eax, eax
je 0x405c9d
mov byte [eax + 1], 0
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405ca2
sub ecx, edx
cmp ecx, 2
jl 0x405cc6
cmp byte [ecx + esi - 2], 0xd
jne 0x405cc6
cmp byte [ecx + esi - 1], 0xa
jne 0x405cc6
mov word [ecx + esi - 2], 0xa
dec ecx
test ecx, ecx
je 0x405cd1
cmp byte [ecx + esi - 1], 0xa
je 0x405ce7
lea edi, [esi - 1]
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x405cd4
mov ax, word [0x40d258]
mov word [edi], ax
mov edi, esi
jmp 0x405ced
xor edi, edi
push dword [ebp - 0x2c]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
call ebx
push dword [ebp - 0x28]
call ebx
push dword [ebp - 8]
call ebx
push dword [ebp - 0xc]
call ebx
pop ebx
pop esi
mov eax, edi
pop edi
mov esp, ebp
pop ebp
ret
Function at 0x405dd0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
test eax, eax
jne 0x405e02
push str.cannot_duplicate_null_pointer__internal_error__n
call sub.libintl_8.dll_libintl_gettext
add esp, 4
push eax
call dword [sym.imp.MSVCR120.dll___iob_func]
add eax, 0x40
push eax
call fcn.00407600
add esp, 8
push 1
call dword [sym.imp.MSVCR120.dll_exit]
push eax
call dword [sym.imp.MSVCR120.dll__strdup]
add esp, 4
test eax, eax
jne 0x405e17
push str.out_of_memory_n
jmp 0x405ddf
pop ebp
ret

Function at 0x405ee0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
test eax, eax
jne 0x405f12
push str.cannot_duplicate_null_pointer__internal_error__n
call sub.libintl_8.dll_libintl_gettext
add esp, 4
push eax
call dword [sym.imp.MSVCR120.dll___iob_func]
add eax, 0x40
push eax
call fcn.00407600
add esp, 8
push 1
call dword [sym.imp.MSVCR120.dll_exit]
push eax
call dword [sym.imp.MSVCR120.dll__strdup]
add esp, 4
test eax, eax
jne 0x405f27
push str.out_of_memory_n
jmp 0x405eef
pop ebp
ret

Function at 0x405ff0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
mov eax, 1
test ebx, ebx
cmove ebx, eax
push ebx
call dword [sym.imp.MSVCR120.dll_malloc]
add esp, 4
mov dword [ebp + 8], eax
test eax, eax
jne 0x406045
test byte [ebp + 0xc], 2
jne 0x406040
push str.out_of_memory_n
call sub.libintl_8.dll_libintl_gettext
add esp, 4
push eax
call dword [sym.imp.MSVCR120.dll___iob_func]
add eax, 0x40
push eax
call fcn.00407600
add esp, 8
push 1
call dword [sym.imp.MSVCR120.dll_exit]
xor eax, eax
pop ebx
pop ebp
ret
test byte [ebp + 0xc], 4
je 0x4060a1
push esi
test al, 3
jne 0x406091
test bl, 3
jne 0x406091
cmp ebx, 0x400
ja 0x406091
mov ecx, eax
xor edx, edx
add eax, ebx
xor ebx, ebx
mov esi, eax
sub esi, dword [ebp + 8]
add esi, 3
shr esi, 2
cmp dword [ebp + 8], eax
push edi
cmova esi, ebx
pop edi
test esi, esi
je 0x40609d
lea esp, [esp]
inc edx
mov dword [ecx], ebx
lea ecx, [ecx + 4]
cmp edx, esi
jb 0x406080
mov eax, dword [ebp + 8]
pop esi
pop ebx
pop ebp
ret
push ebx
push 0
push eax
call sub.MSVCR120.dll_memset
add esp, 0xc
mov eax, dword [ebp + 8]
pop esi
pop ebx
pop ebp
ret
Function at 0x4060b0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, dword [sym.imp.MSVCR120.dll__errno]
push esi
push edi
mov edi, 0x80
push edi
call fcn.00405f30
mov esi, dword [ebp + 8]
mov dword [ebp - 4], eax
call ebx
mov dword [eax], 0
lea eax, [ebp + 0xc]
push eax
push esi
push edi
push dword [ebp - 4]
call fcn.004073f0
mov esi, eax
add esp, 0x14
test esi, esi
jns 0x406126
call ebx
cmp dword [eax], 0
je 0x4060fb
call ebx
cmp dword [eax], 0xc
jne 0x40613e
cmp edi, 0x3fffffff
jae 0x406175
mov esi, 0x3fffffff
cmp edi, 0x1fffffff
jae 0x406113
lea esi, [edi + edi]
cmp esi, edi
jb 0x40616b
push dword [ebp - 4]
call fcn.00405fd0
add esp, 4
mov edi, esi
jmp 0x4060c2
lea eax, [edi - 1]
cmp esi, eax
jb 0x406113
cmp esi, edi
jbe 0x4060fb
cmp esi, 0x3ffffffd
ja 0x4060fb
add esi, 2
jmp 0x406113
call ebx
push dword [eax]
call dword [sym.imp.MSVCR120.dll_strerror]
add esp, 4
push eax
push str.vsnprintf_failed:__s_n
call dword [sym.imp.MSVCR120.dll___iob_func]
add eax, 0x40
push eax
call fcn.00407600
add esp, 0xc
push 1
call dword [sym.imp.MSVCR120.dll_exit]
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.out_of_memory_n
call sub.libintl_8.dll_libintl_gettext
add esp, 4
push eax
call dword [sym.imp.MSVCR120.dll___iob_func]
add eax, 0x40
push eax
call fcn.00407600
add esp, 8
push 1
call dword [sym.imp.MSVCR120.dll_exit]
int3

Function at 0x406300
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
xor edi, edi
cmp dword [str.msvcrt], edi
je 0x406394
mov eax, 0x40f0b0
xor esi, esi
nop
cmp dword [esi + 0x40f0b8], 0
jne 0x406372
cmp dword [esi + 0x40f0b4], 0
jne 0x40637e
push dword [eax]
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [esi + 0x40f0b4], eax
test eax, eax
jne 0x406350
mov dword [esi + 0x40f0b4], 0xffffffff
jmp 0x40637e
push 0x40d620
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esi + 0x40f0b8], eax
test eax, eax
jne 0x406372
mov dword [esi + 0x40f0b4], 0xffffffff
jmp 0x40637e
mov eax, dword [esi + 0x40f0b8]
push ebx
call eax
add esp, 4
inc edi
lea esi, [edi + edi*2]
shl esi, 2
cmp dword [esi + 0x40f0b0], 0
lea eax, [esi + 0x40f0b0]
jne 0x406320
push ebx
call dword [sym.imp.MSVCR120.dll__strdup]
mov esi, eax
add esp, 4
test esi, esi
je 0x4063c0
push 0x3d
push esi
call dword [sym.imp.MSVCR120.dll_strchr]
mov edx, eax
add esp, 8
test edx, edx
jne 0x4063ca
push esi
call dword [sym.imp.MSVCR120.dll_free]
add esp, 4
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
mov byte [edx], 0
inc edx
mov ecx, edx
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4063d3
sub ecx, edi
je 0x4063ea
push edx
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
je 0x4063b6
push esi
call dword [sym.imp.MSVCR120.dll_free]
push ebx
call dword [sym.imp.MSVCR120.dll__putenv]
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x407510
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x41c
mov eax, dword [0x40f1a4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
test eax, eax
jne 0x40754d
call dword [sym.imp.MSVCR120.dll__errno]
mov dword [eax], 0x16
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00409cf2
mov esp, ebp
pop ebp
ret
push ebx
push esi
lea esi, [ebp - 0x404]
mov dword [ebp - 0x410], eax
push edx
mov dword [ebp - 0x41c], esi
lea eax, [ebp - 0x41c]
mov dword [ebp - 0x418], esi
lea esi, [ebp - 5]
push ecx
push eax
mov dword [ebp - 0x414], esi
mov dword [ebp - 0x40c], 0
mov byte [ebp - 0x408], 0
call fcn.00407690
mov esi, dword [ebp - 0x41c]
add esp, 0xc
mov eax, dword [ebp - 0x418]
sub esi, eax
mov bl, byte [ebp - 0x408]
test bl, bl
jne 0x4075d8
test esi, esi
je 0x4075d8
push dword [ebp - 0x410]
push esi
push 1
push eax
call dword [sym.imp.MSVCR120.dll_fwrite]
mov ecx, dword [ebp - 0x40c]
add esp, 0x10
add ecx, eax
movzx ebx, bl
cmp eax, esi
mov edx, 1
cmovne ebx, edx
jmp 0x4075de
mov ecx, dword [ebp - 0x40c]
or eax, 0xffffffff
test bl, bl
pop esi
cmovne ecx, eax
mov eax, ecx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.00409cf2
mov esp, ebp
pop ebp
ret

Function at 0x407640
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [esi]
mov eax, dword [esi + 4]
sub edi, eax
cmp byte [esi + 0x14], 0
jne 0x40767d
test edi, edi
je 0x40767d
push dword [esi + 0xc]
push edi
push 1
push eax
call dword [sym.imp.MSVCR120.dll_fwrite]
add dword [esi + 0x10], eax
add esp, 0x10
cmp eax, edi
mov eax, dword [esi + 4]
mov dword [esi], eax
je 0x40767f
pop edi
mov byte [esi + 0x14], 1
pop esi
pop ebp
ret
mov dword [esi], eax
pop edi
pop esi
pop ebp
ret
Function at 0x408100
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
cmp dword [ebp + 0x18], 0
push ebx
push esi
push edi
je 0x408125
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 8]
mov edi, ecx
test eax, eax
je 0x408137
dec eax
cmp byte [edi], 0
je 0x408137
inc edi
test eax, eax
jne 0x408118
jmp 0x408137
mov edi, dword [ebp + 8]
lea ecx, [edi + 1]
jmp 0x408130
mov al, byte [edi]
inc edi
test al, al
jne 0x408130
mov ebx, dword [ebp + 0x10]
sub edi, ecx
sub ebx, edi
mov eax, 0
cmovs ebx, eax
mov dword [ebp + 0x18], ebx
cmp dword [ebp + 0xc], eax
je 0x408153
neg ebx
mov dword [ebp + 0x18], ebx
mov esi, dword [ebp + 0x1c]
test ebx, ebx
jle 0x4081b4
lea ebx, [ebx]
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x4081a5
mov eax, dword [esi]
cmp eax, ecx
jb 0x4081a5
mov ecx, dword [esi + 0xc]
test ecx, ecx
je 0x4081ac
mov edx, dword [esi + 4]
sub eax, edx
cmp byte [esi + 0x14], 0
mov dword [ebp + 0x18], eax
jne 0x4081a0
test eax, eax
je 0x4081a0
push ecx
push eax
push 1
push edx
call dword [sym.imp.MSVCR120.dll_fwrite]
add dword [esi + 0x10], eax
add esp, 0x10
cmp eax, dword [ebp + 0x18]
je 0x4081a0
mov byte [esi + 0x14], 1
mov eax, dword [esi + 4]
mov dword [esi], eax
mov eax, dword [esi]
mov byte [eax], 0x20
inc dword [esi]
dec ebx
test ebx, ebx
jg 0x408160
mov dword [ebp + 0x18], ebx
push esi
push edi
push dword [ebp + 8]
call fcn.004087e0
lea eax, [ebp + 0x18]
push esi
push eax
call fcn.00408a40
add esp, 0x14
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x408480
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
mov edi, dword [ebp + 0x10]
xor eax, eax
dec edi
cmovs edi, eax
mov dword [ebp + 0x10], edi
cmp dword [ebp + 0xc], eax
je 0x40849b
neg edi
mov dword [ebp + 0x10], edi
mov esi, dword [ebp + 0x14]
test edi, edi
jle 0x4084f4
push ebx
mov eax, dword [esi + 8]
test eax, eax
je 0x4084e4
mov ebx, dword [esi]
cmp ebx, eax
jb 0x4084e4
mov eax, dword [esi + 0xc]
test eax, eax
je 0x4084eb
mov ecx, dword [esi + 4]
sub ebx, ecx
cmp byte [esi + 0x14], 0
jne 0x4084df
test ebx, ebx
je 0x4084df
push eax
push ebx
push 1
push ecx
call dword [sym.imp.MSVCR120.dll_fwrite]
add dword [esi + 0x10], eax
add esp, 0x10
cmp eax, ebx
je 0x4084df
mov byte [esi + 0x14], 1
mov eax, dword [esi + 4]
mov dword [esi], eax
mov eax, dword [esi]
mov byte [eax], 0x20
inc dword [esi]
dec edi
test edi, edi
jg 0x4084a3
mov dword [ebp + 0x10], edi
pop ebx
mov eax, dword [esi + 8]
test eax, eax
je 0x40850e
cmp dword [esi], eax
jb 0x40850e
cmp dword [esi + 0xc], 0
je 0x408517
push esi
call fcn.00407640
add esp, 4
mov ecx, dword [esi]
mov al, byte [ebp + 8]
mov byte [ecx], al
inc dword [esi]
lea eax, [ebp + 0x10]
push esi
push eax
call fcn.00408a40
add esp, 8
pop edi
pop esi
pop ebp
ret

Function at 0x4087e0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 0xc]
test ebx, ebx
jle 0x40885c
push esi
mov esi, dword [ebp + 0x10]
push edi
mov eax, dword [esi + 8]
test eax, eax
je 0x4087fb
sub eax, dword [esi]
jmp 0x4087fd
mov eax, ebx
test eax, eax
jg 0x408839
mov eax, dword [esi + 0xc]
test eax, eax
je 0x40885a
mov edi, dword [esi]
mov ecx, dword [esi + 4]
sub edi, ecx
cmp byte [esi + 0x14], 0
jne 0x408832
test edi, edi
je 0x408832
push eax
push edi
push 1
push ecx
call dword [sym.imp.MSVCR120.dll_fwrite]
add dword [esi + 0x10], eax
add esp, 0x10
cmp eax, edi
je 0x408832
mov byte [esi + 0x14], 1
mov eax, dword [esi + 4]
mov dword [esi], eax
jmp 0x408856
cmp eax, ebx
mov edi, ebx
cmovl edi, eax
push edi
push dword [ebp + 8]
push dword [esi]
call dword [sym.imp.MSVCR120.dll_memmove]
add dword [esi], edi
add esp, 0xc
add dword [ebp + 8], edi
sub ebx, edi
test ebx, ebx
jg 0x4087f0
pop edi
pop esi
pop ebx
pop ebp
ret