joyce8/EMBER2024-capa huggingface dataset:
Function at 0x20006550
Capabilities:
Parse pe header
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x1c], 0
xor eax, eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 8], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0xc], 0
cmp dword [ebp + 8], 0
je 0x200065a6
cmp dword [ebp + 0xc], 0
jne 0x200065ad
xor eax, eax
jmp 0x200066c9
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 0x20]
movzx eax, word [edx]
cmp eax, 0x5a4d
je 0x200065c7
xor eax, eax
jmp 0x200066c9
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp + 8]
add edx, dword [ecx + 0x3c]
mov dword [ebp - 0x28], edx
mov eax, dword [ebp - 0x28]
cmp dword [eax], 0x4550
je 0x200065e5
xor eax, eax
jmp 0x200066c9
mov ecx, dword [ebp - 0x28]
mov edx, dword [ecx + 0x78]
mov eax, dword [ecx + 0x7c]
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x20006600
cmp dword [ebp - 0x1c], 0
jne 0x20006607
xor eax, eax
jmp 0x200066c9
mov ecx, dword [ebp + 8]
add ecx, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
jne 0x20006619
xor eax, eax
jmp 0x200066c9
mov edx, dword [ebp - 8]
mov eax, dword [ebp + 8]
add eax, dword [edx + 0x20]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ebp + 8]
add edx, dword [ecx + 0x24]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 8]
add ecx, dword [eax + 0x1c]
mov dword [ebp - 0xc], ecx
cmp dword [ebp + 0xc], 0xffff
ja 0x2000666e
mov edx, dword [ebp - 8]
mov eax, dword [ebp + 0xc]
sub eax, dword [edx + 0x10]
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x24]
cmp edx, dword [ecx + 0x14]
jb 0x20006661
xor eax, eax
jmp 0x200066c9
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx + eax*4]
jmp 0x200066c9
mov dword [ebp - 0x24], 0
jmp 0x20006680
mov edx, dword [ebp - 0x24]
add edx, 1
mov dword [ebp - 0x24], edx
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x24]
cmp ecx, dword [eax + 0x14]
jae 0x200066c7
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 8]
add ecx, dword [eax + edx*4]
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0x14]
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.20006510
add esp, 8
test eax, eax
jne 0x200066c5
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 4]
movzx eax, word [edx + ecx*2]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp + 8]
add edx, dword [ecx + eax*4]
mov eax, edx
jmp 0x200066c9
jmp 0x20006677
xor eax, eax
mov esp, ebp
pop ebp
ret
Function at 0x200066d0
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov dword [ebp - 4], 0
cmp dword [ebp + 0xc], 0x100
jne case.0x2000671d.5
push 0x11
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
cwde
sar eax, 0xf
mov word [ebp - 8], ax
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0xc]
sub edx, 0x24
mov dword [ebp - 0xc], edx
cmp dword [ebp - 0xc], 0x32
ja case.0x2000671d.5
mov eax, dword [ebp - 0xc]
movzx ecx, byte [eax + 0x200067cc]
jmp dword [ecx*4 + 0x200067b0]
mov dword [0x2000fa6c], 1
cmp dword [0x2000fa50], 0
je 0x2000673c
call fcn.20005b90
jmp case.0x2000671d.5
movsx edx, word [ebp - 8]
test edx, edx
je 0x20006756
cmp dword [0x2000fa50], 0
je 0x20006756
push 2
call fcn.200058a0
jmp case.0x2000671d.5
movsx eax, word [ebp - 8]
test eax, eax
je 0x20006770
cmp dword [0x2000fa50], 0
je 0x20006770
push 3
call fcn.200058a0
jmp case.0x2000671d.5
movsx ecx, word [ebp - 8]
test ecx, ecx
je 0x2000678a
cmp dword [0x2000fa50], 0
je 0x2000678a
push 0
call fcn.200058a0
jmp case.0x2000671d.5
movsx edx, word [ebp - 8]
test edx, edx
je case.0x2000671d.5
cmp dword [0x2000fa50], 0
je case.0x2000671d.5
push 1
call fcn.200058a0
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret 0x10
Function at 0x200074e0
Capabilities:
Hash data with md5

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov dword [eax + 0x14], 0
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x10], 0
mov edx, dword [ebp + 8]
mov dword [edx], 0x67452301
mov eax, dword [ebp + 8]
mov dword [eax + 4], 0xefcdab89
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], 0x98badcfe
mov edx, dword [ebp + 8]
mov dword [edx + 0xc], 0x10325476
pop ebp
ret

Function at 0x20009310
Capabilities:
Hash data with md5

Disassembly:
push ebp
mov ebp, esp
push ecx
mov dword [ebp - 4], ecx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 4]
mov dword [ecx + 0x14], 0
mov edx, dword [ebp - 4]
mov eax, dword [edx + 4]
mov dword [eax + 0x10], 0
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 4]
mov dword [edx], 0x67452301
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 4]
mov dword [ecx + 4], 0xefcdab89
mov edx, dword [ebp - 4]
mov eax, dword [edx + 4]
mov dword [eax + 8], 0x98badcfe
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 4]
mov dword [edx + 0xc], 0x10325476
mov esp, ebp
pop ebp
ret
Function at 0x2000e122
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x20001284]
jne 0x2000e12c
repz ret
jmp fcn.2000e5e0
Function at 0x432000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
mov eax, section..text
nop
nop
nop
push 4
nop
nop
nop
nop
pop edi
nop
nop
nop
cmp eax, 0
nop
nop
nop
nop
nop
nop
je 0x432072
nop
nop
mov ebx, 0x40c7d0
nop
nop
mov ecx, ebx
nop
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
nop
nop
push eax
nop
mov eax, ecx
nop
nop
nop
nop
div edi
nop
nop
nop
nop
nop
nop
nop
nop
xchg ecx, eax
nop
nop
nop
pop eax
nop
nop
nop
mov esi, 0x39516368
nop
nop
xor dword [eax], esi
nop
nop
nop
nop
add eax, edi
nop
nop
nop
nop
nop
nop
loop 0x432060
nop
mov eax, section..data
nop
nop
nop
nop
cmp eax, 0
je 0x4320d2
nop
nop
nop
nop
nop
mov ebx, 0x42f314
nop
nop
nop
mov ecx, ebx
nop
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
push eax
nop
nop
nop
mov eax, ecx
nop
nop
nop
nop
nop
nop
nop
div edi
nop
nop
nop
xchg ecx, eax
nop
nop
nop
nop
pop eax
nop
nop
nop
nop
nop
mov esi, 0x68a877cc
nop
nop
nop
xor dword [eax], esi
nop
nop
add eax, edi
nop
nop
nop
nop
nop
nop
loop 0x4320c0
nop
nop
nop
popal
nop
nop
nop
jmp 0x431219
Function at 0x4c0a90
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x7e000]
push edi
jmp 0x4c0aaa
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x4c0ab1
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x4c0aa0
mov eax, 1
add ebx, ebx
jne 0x4c0ac3
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x4c0ad4
jne 0x4c0af3
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x4c0af3
dec eax
add ebx, ebx
jne 0x4c0ae0
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
jmp 0x4c0ab8
add ebx, ebx
jne 0x4c0aef
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jmp 0x4c0b45
xor ecx, ecx
sub eax, 3
jb 0x4c0b0b
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x4c0b7a
sar eax, 1
mov ebp, eax
jmp 0x4c0b16
add ebx, ebx
jne 0x4c0b16
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x4c0ae4
inc ecx
add ebx, ebx
jne 0x4c0b24
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x4c0ae4
add ebx, ebx
jne 0x4c0b31
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x4c0b26
jne 0x4c0b42
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x4c0b26
add ecx, 2
cmp ebp, 0xfffffb00
adc ecx, 2
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x4c0b64
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x4c0b56
jmp 0x4c0aa6
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x4c0b64
add edi, ecx
jmp 0x4c0aa6
pop esi
mov edi, esi
mov ecx, 0x377e
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x4c0b82
cmp byte [edi], 0x11
jne 0x4c0b82
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov al, bl
loop 0x4c0b87
lea edi, [esi + 0xbc000]
mov eax, dword [edi]
or eax, eax
je 0x4c0bff
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0xd0da8]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0xd0efc]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x4c0bb4
mov ecx, edi
jns 0x4c0be3
movzx eax, word [edi]
inc edi
push eax
inc edi
mov ecx, 0xaef24857
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0xd0f00]
or eax, eax
je 0x4c0bf9
mov dword [ebx], eax
add ebx, 4
jmp 0x4c0bd1
call dword [esi + 0xd0f10]
mov ebp, dword [esi + 0xd0f04]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x22f]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x4c0c33
sub esp, 0xffffff80
jmp 0x416310
Function at 0x433000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x43300c
nop
nop
pop eax
nop
nop
nop
nop
add eax, 0x40a063
sub eax, 0x40a009
nop
nop
nop
mov ebx, dword [eax]
nop
nop
nop
nop
nop
mov ecx, dword [eax + 4]
mov edx, dword [eax + 8]
nop
nop
nop
nop
nop
nop
nop
xor dword [ebx], edx
add ebx, 4
nop
nop
nop
nop
nop
nop
cmp ebx, ecx
nop
jl 0x433030
nop
nop
nop
nop
nop
nop
nop
add eax, 0xc
nop
nop
cmp dword [eax], 0
nop
nop
jne 0x43301e
nop
nop
nop
popal
nop
nop
nop
nop
nop
jmp 0x431219
Function at 0x40150a
Capabilities:
Accept command line arguments
Terminate process

Disassembly:
push 0x18
push 0x402948
call fcn.00402734
xor edi, edi
mov dword [ebp - 0x24], edi
push edi
push edi
push 1
push edi
call dword [sym.imp.KERNEL32.dll_HeapSetInformation]
call fcn.0040175d
test eax, eax
jne 0x40153c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x4015e7
call fcn.004019f7
test eax, eax
jne 0x40154d
push 5
pop esi
jmp 0x4015e7
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
test eax, eax
jne 0x40155b
push 0x57
jmp 0x401547
lea ecx, [ebp - 0x20]
push ecx
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov esi, eax
cmp dword [ebp - 0x20], 2
jl 0x401557
lea eax, [ebp - 0x24]
push eax
push 0x401090
push dword [esi + 4]
call dword [sym.imp.msvcrt.dll_swscanf]
add esp, 0xc
cmp eax, 1
jne 0x401557
mov dword [ebp - 4], edi
mov eax, dword [ebp - 0x24]
dec eax
dec eax
je 0x4015ab
dec eax
dec eax
jne 0x40159c
cmp dword [ebp - 0x20], 3
je 0x4015a1
push 0x57
pop esi
jmp 0x4015dd
push dword [esi + 8]
call fcn.004014b3
jmp 0x4015db
cmp dword [ebp - 0x20], 5
jne 0x40159c
push dword [esi + 0x10]
push dword [esi + 0xc]
push dword [esi + 8]
call fcn.00401455
jmp 0x4015db
mov esi, eax
mov dword [ebp - 0x1c], esi
mov dword [ebp - 4], HeapAlloc
call fcn.004017ee
push esi
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x4019f7
Capabilities:
Get token membership

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x40300c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
xor ebx, ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_SetLastError]
push ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0xc], ebx
mov word [ebp - 8], 0x500
mov dword [ebp - 0x10], ebx
call esi
lea eax, [ebp - 0x10]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
push 2
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x401a67
push ebx
call esi
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x10]
push ebx
call dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
test eax, eax
je 0x401a67
cmp dword [ebp - 0x14], ebx
jne 0x401a78
mov ebx, 0x529
jmp 0x401a78
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test ebx, ebx
jne 0x401a78
mov ebx, 0x507
cmp dword [ebp - 0x10], 0
je 0x401a87
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
push ebx
call esi
mov ecx, dword [ebp - 4]
xor eax, eax
test ebx, ebx
sete al
pop esi
xor ecx, ebp
pop ebx
call fcn.004023dc
leave
ret
Function at 0x401eae
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x218
mov eax, dword [0x40300c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
xor ecx, ecx
push edi
mov ebx, ecx
lea ecx, reloc.KERNEL32.dll_HeapAlloc
push ecx
lea ecx, reloc.KERNEL32.dll_HeapAlloc
push ecx
mov esi, 0x104
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
cmp eax, esi
jae 0x4020a4
test eax, eax
jne 0x401eff
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4020a7
mov eax, dword [ebp - reloc.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x4020a4
lea ecx, reloc.KERNEL32.dll_HeapAlloc
cmp eax, ecx
je 0x4020a4
xor ecx, ecx
mov word [eax], cx
mov ecx, dword [ebp - reloc.KERNEL32.dll_HeapAlloc]
push 0x5c
pop esi
cmp cx, 0x41
jb 0x401f35
cmp cx, 0x5a
jbe 0x401f3e
lea eax, [ecx - 0x61]
cmp ax, 0x19
ja 0x401f5b
cmp word [ebp - 0x20e], 0x3a
jne 0x401f5b
cmp word [ebp - 0x20c], si
jne 0x4020a4
lea ebx, reloc.KERNEL32.dll_HeapAlloc
cmp cx, si
jne 0x401f9c
cmp word [ebp - 0x20e], si
jne 0x401f9c
push esi
mov esi, dword [sym.imp.msvcrt.dll_wcschr]
lea eax, reloc.KERNEL32.dll_HeapAlloc
push eax
call esi
pop ecx
pop ecx
test eax, eax
je 0x4020a4
push 0x5c
pop ebx
add eax, 2
push ebx
push eax
call esi
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
je 0x4020a4
push 0x5c
pop esi
lea eax, reloc.KERNEL32.dll_HeapAlloc
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, reloc.KERNEL32.dll_HeapAlloc
je 0x401fc6
and al, 0x10
movzx eax, al
neg eax
sbb eax, eax
and eax, 0xfffffef5
add eax, 0x10b
jmp 0x4020a7
mov edi, dword [ebp - reloc.KERNEL32.dll_HeapAlloc]
lea eax, reloc.KERNEL32.dll_HeapAlloc
cmp edi, eax
jne 0x401fda
mov edi, eax
jmp 0x401fdd
add edi, 0xfffffffe
cmp edi, ebx
je 0x4020a4
cmp word [edi], si
jne 0x4020a4
cmp edi, ebx
jbe 0x4020a4
xor eax, eax
mov word [edi], ax
lea eax, reloc.KERNEL32.dll_HeapAlloc
push esi
push eax
call dword [sym.imp.msvcrt.dll_wcsrchr]
pop ecx
pop ecx
mov dword [ebp - reloc.KERNEL32.dll_HeapAlloc], eax
test eax, eax
je 0x4020a4
movzx esi, word [eax + 2]
xor ecx, ecx
mov word [eax + 2], cx
lea eax, reloc.KERNEL32.dll_HeapAlloc
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ecx, eax
mov eax, dword [ebp - reloc.KERNEL32.dll_HeapAlloc]
mov word [eax + 2], si
cmp ecx, reloc.KERNEL32.dll_HeapAlloc
jne 0x402094
push 0x5c
mov edi, eax
pop esi
cmp eax, ebx
ja 0x401ff6
cmp edi, ebx
jbe 0x4020a4
mov esi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 0
lea eax, reloc.KERNEL32.dll_HeapAlloc
push eax
call esi
test eax, eax
je 0x401ef4
push 0x5c
pop ebx
xor eax, eax
cmp word [edi + 2], ax
je 0x4020a0
push edi
mov word [edi], bx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edi, [edi + eax*2]
xor eax, eax
push eax
lea eax, reloc.KERNEL32.dll_HeapAlloc
push eax
call esi
test eax, eax
jne 0x40206a
jmp 0x401ef4
test cl, 0x10
jne 0x40204a
mov eax, 0x10b
jmp 0x4020a7
xor eax, eax
jmp 0x4020a7
push 0x7b
pop eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004023dc
leave
ret 4
Function at 0x402510
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
je 0x402526
xor eax, eax
pop ebp
ret
mov ecx, dword [eax + 0x3c]
add ecx, eax
xor eax, eax
cmp dword [ecx], reloc.KERNEL32.dll_HeapAlloc
jne 0x402541
mov edx, 0x10b
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret

Function at 0x402550
Capabilities:
Enumerate pe sections

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x3c]
add ecx, eax
movzx eax, word [ecx + 0x14]
push ebx
movzx ebx, word [ecx + 6]
add eax, 0x18
push esi
xor edx, edx
add eax, ecx
push edi
test ebx, ebx
je 0x40258e
mov edi, dword [ebp + 0xc]
mov esi, dword [eax + 0xc]
cmp edi, esi
jb 0x402586
mov ecx, dword [eax + 8]
add ecx, esi
cmp edi, ecx
jb 0x402590
inc edx
add eax, 0x28
cmp edx, ebx
jb 0x402576
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x4059f0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
sub esp, 0x104
push 0x104
call fcn.00402c80
push eax
lea eax, [esp + 8]
push eax
call fcn.00410330
mov al, byte [esp]
test al, al
jne 0x405a27
push 0x104
push 0x4391e4
lea ecx, [esp + 8]
push ecx
call fcn.00410330
push 0x104
push str.d2exp.mpq
lea edx, [esp + 8]
push edx
call fcn.0040e6b0
lea eax, [esp]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
mov eax, 0x431420
jne 0x405a55
mov eax, 0x431410
mov ecx, dword [esp + 0x10c]
mov edx, dword [esp + 0x108]
push ecx
push edx
push 2
push eax
push str.Diablo_II
call fcn.00405a80
add esp, 0x118
ret

Function at 0x405b40
Capabilities:
Check if file exists
Get file attributes

Disassembly:
sub esp, 0x104
push 0x104
call fcn.00402c80
push eax
lea eax, [esp + 8]
push eax
call fcn.00410330
mov al, byte [esp]
test al, al
jne 0x405b77
push 0x104
push 0x4391e4
lea ecx, [esp + 8]
push ecx
call fcn.00410330
push 0x104
push str.icons_WAR3.bni
lea edx, [esp + 8]
push edx
call fcn.0040e6b0
lea eax, [esp]
push eax
call fcn.00401f60
add esp, 4
push 0x104
call fcn.00402c80
push eax
lea ecx, [esp + 8]
push ecx
call fcn.00410330
mov al, byte [esp]
test al, al
push 0x104
push str.war3x.mpq
jne 0x405bcb
lea edx, [esp + 8]
push edx
call fcn.00410330
jmp 0x405bd5
lea eax, [esp + 8]
push eax
call fcn.0040e6b0
lea ecx, [esp]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor edx, edx
cmp eax, 0xffffffff
setne dl
mov ecx, 0x431438
mov eax, edx
test eax, eax
jne 0x405bf8
mov ecx, 0x431430
mov edx, dword [esp + 0x10c]
push edx
mov edx, dword [esp + 0x10c]
push edx
xor edx, edx
test eax, eax
setne dl
lea edx, [edx + edx + 1]
push edx
push ecx
push str.Warcraft_III
call fcn.00405a80
add esp, 0x118
ret

Function at 0x406180
Capabilities:
Create process on windows

Disassembly:
mov eax, dword [esp + 4]
push 1
push 0x43edcc
push 0x43edcc
push eax
push 0
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
ret
Function at 0x406370
Capabilities:
Check if file exists
Get file attributes

Disassembly:
sub esp, 0xa58
push 0x200
lea eax, [esp + 0x5c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x4065a2
lea ecx, [esp + 0x58]
push ecx
call fcn.0040e680
push str.wow_patch.mpq
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4065a2
mov ecx, dword [0x43936c]
mov edx, dword [0x439364]
mov eax, dword [0x439368]
push esi
push 0xf
mov dword [esp + 0x10], ecx
lea ecx, [esp + 8]
push ecx
push 0x82
mov dword [esp + 0x10], edx
mov dx, word [0x439370]
mov dword [esp + 0x14], eax
mov al, byte [0x439372]
push 0x438d70
push str.Patch
mov word [esp + 0x24], dx
mov byte [esp + 0x26], al
call fcn.00417ac0
mov dword [esp + 0x30], str.base.mpq
mov dword [esp + 0x34], str.dbc.mpq
mov dword [esp + 0x38], str.fonts.mpq
mov dword [esp + 0x3c], str.interface.mpq
mov dword [esp + 0x40], str.misc.mpq
mov dword [esp + 0x44], str.model.mpq
mov dword [esp + 0x48], str.sound.mpq
mov dword [esp + 0x4c], str.speech.mpq
mov dword [esp + 0x50], str.terrain.mpq
mov dword [esp + 0x54], str.texture.mpq
mov dword [esp + 0x58], str.wmo.mpq
mov byte [esp + 0x25c], 0
xor esi, esi
mov edi, edi
test esi, esi
jle 0x40647b
push 0x800
push 0x4391e8
lea edx, [esp + 0x264]
push edx
call fcn.00410430
push 0x800
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0x264]
push ecx
call fcn.00410430
push 0x800
push str.Data
lea edx, [esp + 0x264]
push edx
call fcn.00410430
mov eax, dword [esp + esi*4 + 0x30]
push 0x800
push eax
lea ecx, [esp + 0x264]
push ecx
call fcn.0040e6b0
inc esi
cmp esi, 0xb
jb 0x406460
lea edx, [esp + 0x25c]
push edx
push 2
push str.SrcData
push str.Patch
call fcn.00417cc0
mov eax, dword [str.Datapatch000.mpq]
mov edx, dword [0x4392d0]
mov ecx, dword [0x4392cc]
mov esi, dword [sym.imp.MSVCRT.dll_sprintf]
mov dword [esp + 0x1c], eax
mov eax, dword [0x4392d4]
mov dword [esp + 0x24], edx
lea edx, [esp + 0x1c]
push edx
mov dword [esp + 0x24], ecx
mov cx, word [0x4392d8]
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x60]
push eax
mov word [esp + 0x34], cx
lea ecx, [esp + 0x264]
push 0x4392c0
push ecx
call esi
add esp, 0x10
lea edx, [esp + 0x25c]
push edx
push 2
push str.DstData
push str.Patch
call fcn.00417cc0
mov eax, dword [str.WoW.exe]
mov ecx, dword [0x4392bc]
lea edx, [esp + 0x14]
push edx
mov dword [esp + 0x18], eax
lea eax, [esp + 0x60]
push eax
mov dword [esp + 0x20], ecx
lea ecx, [esp + 0x264]
push 0x4392c0
push ecx
call esi
add esp, 0x10
lea edx, [esp + 0x25c]
push edx
push 2
push str.Launcher
push str.Patch
call fcn.00417cc0
lea eax, [esp + 0x5c]
push eax
call fcn.00402c60
add esp, 4
pop esi
add esp, 0xa58
ret
Function at 0x4091a0
Capabilities:
Check if file exists

Disassembly:
mov eax, dword [esp + 8]
push ebx
mov ebx, dword [esp + 0x10]
push esi
mov esi, dword [esp + 0xc]
push edi
push ebx
push eax
push esi
call fcn.00405860
add esp, 0xc
test eax, eax
je 0x40926c
lea ecx, [esp + 0x18]
push ecx
push 0
push 0
push ebx
call fcn.00415c90
test eax, eax
je 0x40920a
push 0
push 0
push 2
mov ecx, 0x43ef04
call fcn.00409830
mov edx, dword [esp + 0x18]
push 0xf0
push str.C:projectsToolsPatcher_bnupdate_srcfile.cpp
mov edi, eax
push ebx
mov dword [edi + 8], edx
call fcn.004103b0
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], 0
jmp 0x409215
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x40924f
test esi, esi
je 0x409246
lea esp, [esp]
mov dl, 0x3b
mov ecx, esi
mov edi, esi
call fcn.004101b0
mov esi, eax
test esi, esi
je 0x409235
mov byte [esi], 0
inc esi
push edi
call fcn.00409280
add esp, 4
test eax, eax
je 0x40926c
test esi, esi
jne 0x409220
pop edi
pop esi
mov eax, 1
pop ebx
ret
push 0
push 0
push ebx
push 0x81
call fcn.004029d0
push ebx
push str.ERROR:_unable_to_open_archive__s_n_n
call fcn.0040e170
add esp, 0x18
pop edi
pop esi
xor eax, eax
pop ebx
ret

Function at 0x409350
Capabilities:
Get disk information

Disassembly:
mov eax, dword [esp + 0xc]
sub esp, 0x214
push ebx
mov ebx, dword [esp + 0x220]
push esi
push edi
mov edi, dword [esp + 0x224]
push ebx
xor esi, esi
push esi
push esi
push edi
mov dword [eax], 1
call fcn.00415c90
test eax, eax
je 0x40938f
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x214
ret
push ebp
lea ecx, [esp + 0x1c]
push ecx
push 0x104
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], esi
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsA]
cmp eax, esi
je 0x4094bb
cmp eax, 0x104
ja 0x4094bb
lea edx, [esp + 0x10]
push edx
push edi
call fcn.00402390
add esp, 8
test eax, eax
je 0x4094bb
mov al, byte [esp + 0x1c]
test al, al
lea esi, [esp + 0x1c]
je 0x4094bb
mov eax, dword [esp + 0x10]
push 0x7fffffff
push eax
push esi
call fcn.00410250
test eax, eax
push esi
je 0x409409
call fcn.00410400
lea esi, [esi + eax + 1]
cmp byte [esi], 0
jne 0x4093e1
jmp 0x4094bb
mov ebp, dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
call ebp
sub eax, 5
neg eax
sbb eax, eax
inc eax
mov dword [esp + 0x18], eax
je 0x4094bb
mov dl, 0x5c
mov ecx, edi
call fcn.004101e0
test eax, eax
je 0x409433
lea edi, [eax + 1]
mov al, byte [esp + 0x1c]
test al, al
lea esi, [esp + 0x1c]
je 0x409493
nop
push esi
call ebp
cmp eax, 5
jne 0x409484
push 0x104
push esi
lea ecx, [esp + 0x128]
push ecx
call fcn.00410330
push 0x104
push edi
lea edx, [esp + 0x128]
push edx
call fcn.0040e6b0
push ebx
push 0
push 0
lea eax, [esp + 0x12c]
push eax
call fcn.00415c90
test eax, eax
jne 0x4094db
push esi
call fcn.00410400
lea esi, [esi + eax + 1]
cmp byte [esi], 0
jne 0x409440
push 0
push 0
push edi
push 0x83
call fcn.004029d0
add esp, 0x10
test eax, eax
jne 0x409433
call fcn.00406880
mov ecx, dword [esp + 0x230]
mov dword [ecx], 0
mov eax, dword [esp + 0x10]
test eax, eax
pop ebp
je 0x4094cd
push eax
call fcn.00402400
add esp, 4
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
add esp, 0x214
ret
mov dword [esp + 0x14], 1
jmp 0x4094bb