joyce8/EMBER2024-capa huggingface dataset:
Function at 0x46a1f0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
jne 0x46a20b
xor eax, eax
jmp 0x46a217
mov eax, dword [ebp - 4]
and eax, 0x10
neg eax
sbb eax, eax
neg eax
mov esp, ebp
pop ebp
ret

Function at 0x46a300
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.MSVCR100.dll__mkdir]
add esp, 4
test eax, eax
je 0x46a324
call dword [sym.imp.MSVCR100.dll__errno]
cmp dword [eax], 0xd
je 0x46a324
or eax, 0xffffffff
jmp 0x46a326
xor eax, eax
pop ebp
ret
Function at 0x46a5b0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x21c
mov eax, dword [0x4c4b80]
xor eax, ebp
mov dword [ebp - 0x18], eax
push 0x4b6bfc
call dword [sym.imp.MSVCR100.dll_getenv]
add esp, 4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x46a5e2
mov eax, dword [ebp - 4]
jmp 0x46a769
push str.WNCHOME_LS
call dword [sym.imp.MSVCR100.dll_getenv]
add esp, 4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x46a72d
push 0x200
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x46a621
xor eax, eax
jmp 0x46a769
lea ecx, [ebp - 0x218]
mov dword [ebp - 0x21c], ecx
jmp 0x46a63e
mov edx, dword [ebp - 0x21c]
add edx, 1
mov dword [ebp - 0x21c], edx
mov eax, dword [ebp - 0x21c]
movsx ecx, byte [eax]
test ecx, ecx
je 0x46a664
mov edx, dword [ebp - 0x21c]
movsx eax, byte [edx]
cmp eax, 0x5c
jne 0x46a662
mov ecx, dword [ebp - 0x21c]
mov byte [ecx], 0x2f
jmp 0x46a62f
push 0x2f
lea edx, [ebp - 0x218]
push edx
call fcn.0046a780
add esp, 8
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x46a685
xor eax, eax
jmp 0x46a769
mov eax, dword [ebp - 8]
mov byte [eax], 0
mov ecx, dword [ebp - 8]
add ecx, 1
mov dword [ebp - 8], ecx
push 0x2f
lea edx, [ebp - 0x218]
push edx
call fcn.0046a780
add esp, 8
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x46a6b5
xor eax, eax
jmp 0x46a769
mov eax, dword [ebp - 0xc]
mov byte [eax], 0
mov ecx, dword [ebp - 0xc]
add ecx, 1
mov dword [ebp - 0xc], ecx
push 0x2f
lea edx, [ebp - 0x218]
push edx
call fcn.0046a780
add esp, 8
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x46a6e5
xor eax, eax
jmp 0x46a769
mov eax, dword [ebp - 0x10]
mov byte [eax], 0
mov ecx, dword [ebp - 0x10]
add ecx, 1
mov dword [ebp - 0x10], ecx
push 0x4b6c10
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.MSVCR100.dll__stricmp]
add esp, 8
test eax, eax
jne 0x46a720
push 0x4b6c14
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.MSVCR100.dll__stricmp]
add esp, 8
test eax, eax
je 0x46a724
xor eax, eax
jmp 0x46a769
lea ecx, [ebp - 0x218]
mov dword [ebp - 4], ecx
movzx edx, byte [ebp + 8]
test edx, edx
je 0x46a766
push str.WNCHOME
push 0xd2d788
call sub.MSVCR100.dll_strcpy
add esp, 8
mov eax, dword [ebp - 4]
push eax
push 0xd2d788
call sub.MSVCR100.dll_strcat
add esp, 8
push 0xd2d788
call dword [sym.imp.MSVCR100.dll__putenv]
add esp, 4
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.0048d046
mov esp, ebp
pop ebp
ret
Function at 0x471410
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebx
push esi
mov esi, ecx
mov ebx, dword [esi + 0x28]
push edi
xor edi, edi
mov dword [esi + 0x24], edi
cmp ebx, edi
je 0x471434
mov ecx, ebx
call fcn.0046dbc0
push ebx
call sub.MSVCR100.dll_void___cdecl_operator_delete_void__
add esp, 4
mov dword [esi + 0x28], edi
cmp dword [esi + 0x2c], edi
je 0x47149b
xor edx, edx
cmp dword [esi + 0x14], edi
jle 0x471487
push ebp
mov eax, dword [esi + 0x2c]
cmp dword [eax + edx*4], edi
lea ecx, [eax + edx*4]
je 0x471480
mov eax, dword [ecx]
mov ebx, dword fs:[0x2c]
mov dword [eax], edi
mov dword [eax + 4], edi
mov dword [eax + 0x10], edi
mov dword [eax + 0xc], edi
mov dword [eax + 8], edi
mov eax, dword [0xd2d9b8]
mov eax, dword [ebx + eax*4]
mov ebx, dword [ecx]
mov ebp, dword [eax + 0x38]
mov dword [ebx + 0x10], ebp
mov ebx, dword [ecx]
mov dword [eax + 0x38], ebx
mov dword [ecx], edi
inc edx
cmp edx, dword [esi + 0x14]
jl 0x471441
pop ebp
mov ecx, dword [esi + 0x2c]
push ecx
call sub.MSVCR100.dll_void___cdecl_operator_delete_void__
add esp, 4
mov dword [esi + 0x2c], edi
mov dword [esi + 0x14], edi
mov dword [esi], edi
mov ecx, esi
call fcn.00470b00
lea ecx, [esi + 0x30]
call fcn.0046c630
pop edi
lea ecx, [esi + 0xc8]
pop esi
pop ebx
jmp fcn.0046c630

Function at 0x4714c0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4ac439
mov eax, dword fs:[0]
push eax
push ecx
push esi
mov eax, dword [0x4c4b80]
xor eax, esp
push eax
lea eax, [esp + 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 8], esi
mov dword [esp + 0x14], 1
call fcn.00471410
call fcn.00470570
call fcn.004705d0
call fcn.0046f330
lea ecx, [esi + 0xc8]
mov byte [esp + 0x14], 0
call fcn.0046c630
push 0x40b130
push 4
push 0x18
add ecx, 0x18
push ecx
call fcn.0048cec0
lea ecx, [esi + 0x30]
mov dword [esp + 0x14], 0xffffffff
call fcn.0046c630
push 0x40b130
push 4
push 0x18
add ecx, 0x18
push ecx
call fcn.0048cec0
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
add esp, 0x10
ret

Function at 0x4731b3
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
push ebp
push esi
mov esi, ecx
mov eax, dword [esi]
xor ebp, ebp
push edi
mov dword [esp + 0x10], ebp
cmp eax, ebp
je 0x4731cd
inc dword [esp + 0x10]
mov eax, dword [eax]
cmp eax, ebp
jne 0x4731c3
mov edi, dword [esp + 0x18]
mov ebx, dword [sym.imp.MSVCR100.dll_fwrite]
push edi
push 1
lea eax, [esi + 8]
push 4
push eax
call ebx
add esp, 0x10
cmp eax, 1
je 0x4731f7
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
pop ecx
ret 4
push edi
push 1
lea ecx, [esp + 0x18]
push 4
push ecx
call ebx
add esp, 0x10
cmp eax, 1
jne 0x4731ea
mov esi, dword [esi]
cmp esi, ebp
je 0x473239
push edi
push 2
lea edx, [esi + 8]
push 0xc
push edx
call ebx
add esp, 0x10
cmp eax, 2
jne 0x473234
mov esi, dword [esi]
test esi, esi
jne 0x473211
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
pop ecx
ret 4
mov ebp, 1
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
pop ecx
ret 4
Function at 0x477180
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push 0xffffffffffffffff
push 0x4ac58f
mov eax, dword fs:[0]
push eax
push ebx
push esi
push edi
mov eax, dword [0x4c4b80]
xor eax, esp
push eax
lea eax, [esp + 0x10]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [esp + 0x20]
fld dword [esp + 0x24]
mov edi, dword [esp + 0x34]
fstp dword [esi]
mov dword [esi + 0xc], eax
fld dword [esp + 0x28]
mov ecx, 1
fstp dword [esi + 4]
sub ecx, eax
fld dword [esp + 0x2c]
mov dword [esi + 8], ecx
fstp dword [esi + 0x20]
xor ecx, ecx
fld dword [esp + 0x30]
mov eax, edi
fstp dword [esi + 0x24]
mov edx, 0xc
mul edx
seto cl
mov dword [esi + 0x10], edi
mov dword [esi + 0x28], fcn.00475e40
neg ecx
or ecx, eax
xor eax, eax
add ecx, 4
setb al
neg eax
or eax, ecx
push eax
call sub.MSVCR100.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x20], eax
mov dword [esp + 0x18], 0
test eax, eax
je 0x477230
push fcn.004744e0
push fcn.004718b0
push edi
lea ebx, [eax + 4]
push 0xc
push ebx
mov dword [eax], edi
call fcn.0048cfdb
jmp 0x477232
xor ebx, ebx
mov dword [esi + 0x14], ebx
test ebx, ebx
jne 0x477251
lea eax, [ebx + 1]
mov ecx, dword [esp + 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0xc
ret 0x18
xor ecx, ecx
mov dword [esp + 0x20], ecx
cmp dword [esi + 0x10], ecx
jle 0x47728d
xor edx, edx
mov edi, edi
fild dword [esp + 0x20]
mov eax, dword [esi + 0x14]
inc ecx
add edx, 0xc
fmul dword [esi + 4]
mov dword [esp + 0x20], ecx
fadd dword [esi]
mov dword [eax + edx - 8], 0
mov dword [eax + edx - 0xc], 0
fstp dword [eax + edx - 4]
cmp ecx, dword [esi + 0x10]
jl 0x477260
xor eax, eax
mov ecx, dword [esp + 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0xc
ret 0x18
Function at 0x477cf0
Capabilities:
Access peb ldr_data
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x4ac5db
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x4c4b80]
xor eax, esp
push eax
lea eax, [esp + 0x14]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [esp + 0x34]
fld dword [esp + 0x30]
push eax
sub esp, 0x10
fstp dword [esp + 0xc]
xor edi, edi
fld dword [esp + 0x40]
fstp dword [esp + 8]
fld dword [esp + 0x3c]
fstp dword [esp + 4]
fld dword [esp + 0x38]
fstp dword [esp]
push edi
call fcn.00477180
test eax, eax
je 0x477d6b
push edi
mov ecx, esi
call fcn.00477930
mov eax, 1
mov ecx, dword [esp + 0x14]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0x10
ret 0x28
mov ecx, dword [esp + 0x48]
fld dword [esp + 0x44]
push ecx
sub esp, 0x10
fstp dword [esp + 0xc]
lea ebx, [esi + 0x2c]
fld dword [esp + 0x54]
mov ecx, ebx
fstp dword [esp + 8]
fld dword [esp + 0x50]
fstp dword [esp + 4]
fld dword [esp + 0x4c]
fstp dword [esp]
push 1
call fcn.00477180
test eax, eax
jne 0x477d49
mov eax, dword [esi + 0x5c]
push eax
mov dword [esi + 0x18], esi
mov dword [esi + 0x44], esi
mov dword [esi + 0x1c], ebx
mov dword [esi + 0x48], esi
call sub.MSVCR100.dll_void___cdecl_operator_delete_void__
mov eax, dword [esi + 0x64]
add esp, 4
mov dword [esi + 0x5c], edi
mov dword [esi + 0x58], edi
cmp eax, edi
je 0x477de4
mov edx, dword [eax - 4]
lea ebx, [eax - 4]
push 0x4743b0
push edx
push 0xc
push eax
call fcn.0048cec0
push ebx
call sub.MSVCR100.dll_void___cdecl_operator_delete_void__
add esp, 4
mov eax, dword [esi + 0x6c]
push eax
mov dword [esi + 0x64], edi
mov dword [esi + 0x60], edi
call sub.MSVCR100.dll_void___cdecl_operator_delete_void__
push 0x10
mov dword [esi + 0x68], edi
mov dword [esi + 0x6c], edi
call sub.MSVCR100.dll_void____cdecl_operator_new_unsigned_int_
add esp, 8
cmp eax, edi
je 0x477e18
mov dword [eax], edi
mov dword [eax + 4], edi
mov dword [eax + 0xc], edi
mov dword [eax + 8], 0x64
jmp 0x477e1a
xor eax, eax
mov dword [esp + 0x1c], 0xffffffff
mov dword [esi + 0x70], eax
cmp eax, edi
je 0x477d49
xor eax, eax
mov ecx, dword [esp + 0x14]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0x10
ret 0x28
Function at 0x48ba90
Capabilities:
Read file on windows

Disassembly:
push ebx
mov ebx, dword [sym.imp.MSVCR100.dll_fread]
push ebp
mov ebp, dword [esp + 0x10]
push esi
mov esi, dword [esp + 0x18]
push edi
mov edi, dword [esp + 0x14]
push edi
push 1
lea eax, [esp + 0x20]
push 4
mov dword [ebp], 0
push eax
mov dword [esi], 0xffffffff
call ebx
add esp, 0x10
cmp eax, 1
je 0x48bad1
pop edi
pop esi
pop ebp
mov eax, 7
pop ebx
ret
mov ecx, 0x42443353
cmp dword [esp + 0x18], ecx
je 0x48bb0b
movzx edx, byte [esp + 0x18]
mov al, byte [esp + 0x1b]
mov byte [esp + 0x1b], dl
movzx edx, byte [esp + 0x19]
mov byte [esp + 0x18], al
mov al, byte [esp + 0x1a]
mov byte [esp + 0x1a], dl
mov byte [esp + 0x19], al
cmp dword [esp + 0x18], ecx
jne 0x48bb4c
mov dword [ebp], 1
push edi
push 1
push 4
push esi
call ebx
add esp, 0x10
cmp eax, 1
jne 0x48bac7
cmp dword [ebp], 0
je 0x48bb39
movzx edx, byte [esi]
mov cl, byte [esi + 3]
mov byte [esi + 3], dl
mov byte [esi], cl
movzx edx, byte [esi + 1]
mov cl, byte [esi + 2]
mov byte [esi + 2], dl
mov byte [esi + 1], cl
mov esi, dword [esi]
cmp esi, 1
jl 0x48bb4c
cmp esi, 3
jg 0x48bb4c
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
pop edi
pop esi
pop ebp
mov eax, 0xe
pop ebx
ret
Function at 0x48d046
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x4c4b80]
jne 0x48d050
repz ret
jmp fcn.0048d54e

Function at 0x4968d0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
mov eax, dword [0x4c4b80]
xor eax, ebp
mov dword [ebp - 4], eax
call fcn.0049b950
test eax, eax
je 0x496903
call fcn.0049b8b0
push eax
lea eax, [ebp - 0x210]
push eax
call sub.MSVCR100.dll_strcpy
add esp, 8
jmp 0x49694c
push 0x4b9068
call dword [sym.imp.MSVCR100.dll_getenv]
add esp, 4
mov dword [ebp - 0x214], eax
cmp dword [ebp - 0x214], 0
jne 0x496936
push 0x4b9070
lea ecx, [ebp - 0x210]
push ecx
call sub.MSVCR100.dll_strcpy
add esp, 8
jmp 0x49694c
mov edx, dword [ebp - 0x214]
push edx
lea eax, [ebp - 0x210]
push eax
call sub.MSVCR100.dll_strcpy
add esp, 8
push 0x4b9074
push 0x4b907c
push 0x5c
lea ecx, [ebp - 0x210]
push ecx
push 0x4b9084
push 0xd2e4b0
call dword [sym.imp.MSVCR100.dll_sprintf]
add esp, 0x18
mov byte [0xd2e6b0], 0
push 0x4b9090
push 0xd2e4b0
call dword [sym.imp.MSVCR100.dll_strcspn]
add esp, 8
mov byte [eax + 0xd2e4b0], 0
push 0x201
push 0xd2e4b0
call fcn.00496760
add esp, 8
push 0x4b9094
push str.zone
push 0x5c
lea edx, [ebp - 0x210]
push edx
push str._s_c_s_s
push 0xd2e6b8
call dword [sym.imp.MSVCR100.dll_sprintf]
add esp, 0x18
mov byte [0xd2e8b8], 0
push 0x4b90b0
push 0xd2e6b8
call dword [sym.imp.MSVCR100.dll_strcspn]
add esp, 8
mov byte [eax + 0xd2e6b8], 0
push 0x201
push 0xd2e6b8
call fcn.00496760
add esp, 8
cmp dword [0xd2e8c4], 0
jne 0x496a1e
push 0x496880
call fcn.0048d127
add esp, 4
mov dword [0xd2e8c4], 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0048d046
mov esp, ebp
pop ebp
ret

Function at 0x49b330
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x408
mov eax, dword [0x4c4b80]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [0xd33d5c], 0
je 0x49b396
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp + 0xc]
push edx
push str._s___d__:__d_n
lea eax, [ebp - 0x408]
push eax
call dword [sym.imp.MSVCR100.dll_sprintf]
add esp, 0x14
mov ecx, dword [0xd33d58]
push ecx
lea edx, [ebp - 0x408]
push edx
call sub.MSVCR100.dll_strlen
add esp, 4
push eax
push 1
lea eax, [ebp - 0x408]
push eax
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0048d046
mov esp, ebp
pop ebp
ret

Function at 0x49b8b0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov dword [ebp - 4], 0x4b92c8
cmp dword [0xd2f894], 0
je 0x49b8cf
mov eax, 0xd2f898
jmp 0x49b8f0
push 0x4b92cc
call dword [sym.imp.MSVCR100.dll_getenv]
add esp, 4
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x49b8ed
mov eax, dword [ebp - 8]
jmp 0x49b8f0
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
Function at 0x49b960
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ecx
cmp dword [0xd2f894], 0
je 0x49b981
push 0xd2f898
push 0xd33b20
call sub.MSVCR100.dll_strcpy
add esp, 8
jmp 0x49b9bd
push str.WNCZONE
call dword [sym.imp.MSVCR100.dll_getenv]
add esp, 4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x49b9ac
push 0x4b92e8
push 0xd33b20
call sub.MSVCR100.dll_strcpy
add esp, 8
jmp 0x49b9bd
mov eax, dword [ebp - 4]
push eax
push 0xd33b20
call sub.MSVCR100.dll_strcpy
add esp, 8
push 0x4b92ec
mov ecx, dword [ebp + 8]
push ecx
call fcn.004aaf40
add esp, 8
push eax
push 0x5c
push 0xd33b20
push str._s_c_s
push 0xd33918
call dword [sym.imp.MSVCR100.dll_sprintf]
add esp, 0x14
push 0x201
push 0xd33918
call fcn.00460870
add esp, 8
cmp dword [0xd33d2c], 0
jne 0x49ba1b
push 0x49b850
call fcn.0048d127
add esp, 4
mov dword [0xd33d2c], 1
mov esp, ebp
pop ebp
ret

Function at 0x4a5030
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
mov eax, dword [ebp + 0x10]
mov dword [eax], 0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx*4 + 0xd33e70]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call sub.MSVCR100.dll_strlen
add esp, 4
push eax
push 1
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
mov esi, eax
mov eax, dword [ebp + 0xc]
push eax
call sub.MSVCR100.dll_strlen
add esp, 4
cmp esi, eax
je 0x4a508a
mov ecx, dword [ebp + 0x10]
mov dword [ecx], 0xffffffe6
jmp 0x4a50c0
mov dx, word [0x4b9bb8]
mov word [ebp - 8], dx
mov al, byte [0x4b9bba]
mov byte [ebp - 6], al
mov ecx, dword [ebp - 4]
push ecx
push 2
push 1
lea edx, [ebp - 8]
push edx
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
cmp eax, 2
je 0x4a50c0
mov eax, dword [ebp + 0x10]
mov dword [eax], 0xffffffe6
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x4a51b0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 0x14]
mov dword [eax], 0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx*4 + 0xd33e70]
mov dword [ebp - 0xc], edx
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0xc]
push eax
push 1
push 1
lea ecx, [ebp - 5]
push ecx
call dword [sym.imp.MSVCR100.dll_fread]
add esp, 0x10
cmp eax, 1
je 0x4a5205
mov edx, dword [ebp + 0x14]
mov dword [edx], 0xffffffe7
mov byte [ebp - 5], 0
mov eax, dword [ebp + 0xc]
add eax, dword [ebp - 4]
mov byte [eax], 0
jmp 0x4a5219
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 4]
mov dl, byte [ebp - 5]
mov byte [ecx], dl
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0x10]
sub ecx, 1
cmp dword [ebp - 4], ecx
jge 0x4a5235
movsx edx, byte [ebp - 5]
cmp edx, 0xa
je 0x4a5235
mov eax, dword [ebp + 0x14]
cmp dword [eax], 0
je 0x4a51d3
mov ecx, dword [ebp + 0x10]
sub ecx, 1
cmp dword [ebp - 4], ecx
jne 0x4a52b0
movsx edx, byte [ebp - 5]
cmp edx, 0xa
je 0x4a52b0
mov eax, dword [ebp + 0x14]
mov dword [eax], 0xffffffd6
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 4]
movsx edx, byte [ecx - 1]
cmp edx, 0xa
je 0x4a526c
mov eax, dword [ebp + 0xc]
add eax, dword [ebp - 4]
mov byte [eax], 0xa
jmp 0x4a5275
mov ecx, dword [ebp - 4]
sub ecx, 1
mov dword [ebp - 4], ecx
mov edx, dword [ebp + 0xc]
add edx, dword [ebp - 4]
movsx eax, byte [edx]
cmp eax, 0xd
je 0x4a5291
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 4]
movsx edx, byte [ecx]
cmp edx, 0xa
jne 0x4a52ab
cmp dword [ebp - 4], 0
jl 0x4a52ab
mov eax, dword [ebp + 0xc]
add eax, dword [ebp - 4]
mov byte [eax], 0
mov ecx, dword [ebp - 4]
sub ecx, 1
mov dword [ebp - 4], ecx
jmp 0x4a5275
jmp 0x4a5347
mov edx, dword [ebp + 0x14]
cmp dword [edx], 0xffffffe7
je 0x4a52c1
movsx eax, byte [ebp - 5]
cmp eax, 0xa
jne 0x4a52d2
cmp dword [ebp - 4], 0
jne 0x4a52d2
mov ecx, dword [ebp + 0x14]
mov dword [ecx], 0xffffffe9
jmp 0x4a5347
mov edx, dword [ebp - 4]
sub edx, 1
mov dword [ebp - 4], edx
mov dword [ebp - 0x10], 0
mov eax, dword [ebp + 0xc]
add eax, dword [ebp - 4]
movsx ecx, byte [eax]
cmp ecx, 0xd
je 0x4a52fe
mov edx, dword [ebp + 0xc]
add edx, dword [ebp - 4]
movsx eax, byte [edx]
cmp eax, 0xa
jne 0x4a5347
cmp dword [ebp - 4], 0
jl 0x4a5347
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 4]
movsx edx, byte [ecx]
cmp edx, 0xa
jne 0x4a5333
cmp dword [ebp - 0x10], 0
jne 0x4a5331
mov dword [ebp - 0x10], 1
mov eax, dword [ebp + 0xc]
add eax, dword [ebp - 4]
mov byte [eax], 0
mov ecx, dword [ebp - 4]
sub ecx, 1
mov dword [ebp - 4], ecx
jmp 0x4a5345
mov edx, dword [ebp + 0xc]
add edx, dword [ebp - 4]
mov byte [edx], 0
mov eax, dword [ebp - 4]
sub eax, 1
mov dword [ebp - 4], eax
jmp 0x4a52e2
mov esp, ebp
pop ebp
ret
Function at 0x4a5c90
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [ebp + 8]
push eax
call fcn.004a57f0
add esp, 4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x4a5cb5
mov eax, 0xfffffff5
jmp 0x4a5de9
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x320]
and edx, 1
jne 0x4a5ccd
mov eax, 0xfffffff4
jmp 0x4a5de9
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x320]
shr ecx, 2
and ecx, 1
je 0x4a5cfb
mov edx, dword [ebp - 4]
push edx
call fcn.004a7a20
add esp, 4
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x4a5cfb
mov eax, dword [ebp - 8]
jmp 0x4a5de9
mov eax, dword [ebp - 4]
movsx ecx, byte [eax + 4]
cmp ecx, 1
je 0x4a5d6a
push 0
push 0
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0xc]
push eax
call dword [sym.imp.MSVCR100.dll_fseek]
add esp, 0xc
mov ecx, dword [ebp - 4]
push ecx
call fcn.004a5a10
add esp, 4
mov edx, dword [ebp - 4]
movsx eax, byte [edx + 0x2ab]
test eax, eax
je 0x4a5d6a
mov ecx, dword [ebp - 4]
movsx edx, byte [ecx + 0x2aa]
test edx, edx
jne 0x4a5d6a
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0xc]
push ecx
push 1
mov edx, dword [ebp - 4]
movsx eax, word [edx + 0x316]
push eax
mov ecx, dword [ebp - 4]
add ecx, 0x2d0
push ecx
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0xc]
push eax
call dword [sym.imp.MSVCR100.dll_fclose]
add esp, 4
mov ecx, dword [ebp - 4]
cmp dword [ecx + 0x2c4], 0
je 0x4a5da6
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x2c4]
push eax
call dword [sym.imp.MSVCR100.dll_free]
add esp, 4
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x2c4], 0
mov edx, dword [ebp - 4]
cmp dword [edx + 0x2cc], 0
je 0x4a5dd2
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x2cc]
push ecx
call dword [sym.imp.MSVCR100.dll_free]
add esp, 4
mov edx, dword [ebp - 4]
mov dword [edx + 0x2cc], 0
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x320]
and ecx, 0xfffffffe
mov edx, dword [ebp - 4]
mov dword [edx + 0x320], ecx
xor eax, eax
mov esp, ebp
pop ebp
ret
Function at 0x4a6b40
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x320]
and ecx, 0xfffffffd
mov edx, dword [ebp + 8]
mov dword [edx + 0x320], ecx
mov eax, dword [ebp + 8]
mov ecx, dword [str.WKNC_Id:_fbread.cpp_7003_2011_05_16_16:32:53Z_jsturton___WORKNC]
mov dword [eax + 0x210], ecx
mov edx, dword [ebp + 8]
mov dword [edx + 0x214], 0xffffffff
mov eax, dword [ebp + 8]
mov dword [eax + 0x21c], 0xa0
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x218], 0xa0
mov edx, dword [ebp + 8]
mov dword [edx + 0x220], 0
mov eax, dword [ebp + 8]
mov dword [eax + 0x224], 0
call fcn.004a5680
push eax
mov ecx, dword [ebp + 8]
add ecx, 0x228
push ecx
call sub.MSVCR100.dll_strcpy
add esp, 8
mov edx, dword [ebp + 8]
mov byte [edx + 0x2a8], 1
mov eax, dword [ebp + 8]
mov byte [eax + 0x2a9], 1
mov ecx, dword [ebp + 8]
mov byte [ecx + 0x2aa], 1
mov edx, dword [ebp + 8]
mov byte [edx + 0x2ac], 0
call fcn.004a5610
neg eax
sbb eax, eax
neg eax
mov ecx, dword [ebp + 8]
mov byte [ecx + 0x2ab], al
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xc]
push eax
push 0xa0
push 1
mov ecx, dword [ebp + 8]
add ecx, 0x210
push ecx
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
cmp eax, 0xa0
je 0x4a6c2b
mov eax, 0xffffffe6
jmp 0x4a6c2d
xor eax, eax
pop ebp
ret

Function at 0x4a6c30
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x14]
mov ecx, dword [eax + 0xc]
push ecx
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.MSVCR100.dll_fread]
add esp, 0x10
pop ebp
ret
Function at 0x4a79f0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x14]
mov ecx, dword [eax + 0xc]
push ecx
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
pop ebp
ret