joyce8/EMBER2024-capa huggingface dataset:
Function at 0x5e5a60
Capabilities:
Check for time delay via gettickcount

Disassembly:
sub esp, 0xa0
push ebx
push ebp
mov ebp, dword [esp + 0xac]
push esi
push edi
push ebp
call sub.RASAPI32.dll_RasHangUpA
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, 0x28
xor eax, eax
lea edi, [esp + 0x10]
rep stosd dword es:[edi], eax
mov dword [esp + 0x10], 0xa0
call esi
mov edi, eax
call esi
sub eax, edi
cmp eax, 0xbb8
jae 0x5e5ac6
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [esp + 0x10]
push eax
push ebp
call sub.RASAPI32.dll_RasGetConnectStatusA
cmp eax, 6
je 0x5e5ac6
push 0
call ebx
call esi
sub eax, edi
cmp eax, 0xbb8
jb 0x5e5aa7
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa0
ret

Function at 0x5e71a0
Capabilities:
Encrypt data using des

Disassembly:
sub esp, 0xf4
xor ecx, ecx
push ebx
push ebp
push esi
mov esi, dword [esp + 0x104]
push edi
xor eax, eax
mov al, byte [ecx + 0x9b3b4c]
mov edx, eax
and eax, 7
sar edx, 3
mov bl, byte [eax*2 + 0x9b3adc]
mov dl, byte [edx + esi]
test bl, dl
setne al
mov byte [esp + ecx + 0x4c], al
inc ecx
cmp ecx, 0x38
jl 0x5e71b3
mov eax, 0x1e
xor edx, edx
mov dword [esp + 0x10], eax
cmp dword [esp + 0x10c], 1
je 0x5e71f4
lea eax, [edx + edx]
lea edi, [esp + eax*4 + 0x88]
lea ebp, [esp + eax*4 + 0x84]
xor eax, eax
xor ecx, ecx
mov cl, byte [edx + 0x9b3b84]
mov dword [edi], 0
mov dword [ebp], 0
mov esi, ecx
cmp ecx, 0x1c
jge 0x5e7226
mov bl, byte [esp + ecx + 0x4c]
jmp 0x5e722a
mov bl, byte [esp + ecx + 0x30]
mov byte [esp + eax + 0x14], bl
inc eax
inc ecx
cmp eax, 0x1c
jl 0x5e721b
mov eax, 0x1c
lea ecx, [esi + 0x1c]
cmp ecx, 0x38
jge 0x5e7248
mov bl, byte [esp + ecx + 0x4c]
jmp 0x5e724c
mov bl, byte [esp + ecx + 0x30]
mov byte [esp + eax + 0x14], bl
inc eax
inc ecx
cmp eax, 0x38
jl 0x5e723d
xor ecx, ecx
mov eax, 0x9b3aec
xor ebx, ebx
mov bl, byte [ecx + 0x9b3b94]
cmp byte [esp + ebx + 0x14], 0
je 0x5e7277
mov esi, dword [eax]
mov ebx, dword [ebp]
or ebx, esi
mov dword [ebp], ebx
xor ebx, ebx
mov bl, byte [ecx + 0x9b3bac]
cmp byte [esp + ebx + 0x14], 0
je 0x5e728e
mov esi, dword [eax]
mov ebx, dword [edi]
or ebx, esi
mov dword [edi], ebx
add eax, 4
inc ecx
cmp eax, 0x9b3b4c
jl 0x5e725e
mov eax, dword [esp + 0x10]
inc edx
sub eax, 2
cmp eax, 0xfffffffe
mov dword [esp + 0x10], eax
jg 0x5e71e7
lea edx, [esp + 0x84]
push edx
call fcn.005e72d0
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xf4
ret
Function at 0x5f4b10
Capabilities:
Get common file path

Disassembly:
sub esp, 0x408
push ebx
push ebp
push esi
push edi
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x19]
mov byte [esp + 0x18], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x18]
xor esi, esi
push eax
push 0x400
mov dword [esp + 0x1c], esi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov ecx, dword [esp + 0x420]
lea edi, [esp + 0x18]
push ecx
or ecx, 0xffffffff
xor eax, eax
push 0x9f54cc
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edx, [esp + ecx + 0x20]
push edx
call fcn.006185b7
mov ebp, dword [esp + 0x428]
mov al, byte [esp + 0x1f]
lea edi, [esp + 0x24]
or ecx, 0xffffffff
mov byte [ebp], al
xor eax, eax
add esp, 0xc
mov dword [ebp + 4], esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [ebp + 8], esi
mov ebx, ecx
mov dword [ebp + 0xc], esi
cmp ebx, 0xfffffffd
jbe 0x5f4b9e
call fcn.006277a6
mov ecx, dword [ebp + 4]
cmp ecx, esi
je 0x5f4bd0
mov al, byte [ecx - 1]
test al, al
je 0x5f4bd0
cmp al, 0xff
je 0x5f4bd0
cmp ebx, esi
jne 0x5f4c01
dec al
push esi
mov byte [ecx - 1], al
mov ecx, ebp
call fcn.005f5e10
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x408
ret 8
cmp ebx, esi
jne 0x5f4bec
push 1
mov ecx, ebp
call fcn.005f5e10
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x408
ret 8
mov eax, dword [ebp + 0xc]
cmp eax, 0x1f
ja 0x5f4bf8
cmp eax, ebx
jae 0x5f4c09
push 1
mov ecx, ebp
call fcn.005f5e10
push ebx
mov ecx, ebp
call fcn.005f5870
mov edi, dword [ebp + 4]
mov ecx, ebx
mov edx, ecx
lea esi, [esp + 0x18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 4]
mov dword [ebp + 8], ebx
pop edi
pop esi
mov byte [eax + ebx], 0
mov eax, ebp
pop ebp
pop ebx
add esp, 0x408
ret 8
Function at 0x5f4fd0
Capabilities:
Delete file

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x63b698
push eax
mov dword fs:[0], esp
sub esp, 0x10
xor al, al
push ebx
push ebp
push esi
mov esi, ecx
mov cl, byte [esi + 0xc]
test cl, cl
je 0x5f50f4
mov ecx, dword [esi + 4]
xor ebp, ebp
sub ecx, ebp
je 0x5f5106
dec ecx
je 0x5f504c
dec ecx
jne 0x5f50f4
mov eax, dword [esi + 8]
cmp eax, ebp
je 0x5f511b
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp eax, 1
jne 0x5f511b
mov dword [esi + 8], ebp
mov eax, dword [esi + 0x18]
cmp eax, ebp
je 0x5f5045
mov eax, dword [0x992004]
lea ecx, [esi + 0x10]
push eax
push ebp
call fcn.005f5550
mov bl, 1
jmp 0x5f50e7
mov edx, dword [0x992004]
mov cl, byte [esi + 0x10]
push edi
lea edi, [esi + 0x10]
push edx
mov byte [esp + 0x14], cl
push ebp
push edi
lea ecx, [esp + 0x1c]
mov dword [esp + 0x20], ebp
mov dword [esp + 0x24], ebp
mov dword [esp + 0x28], ebp
call fcn.005f5350
mov eax, dword [esi + 8]
mov dword [esp + 0x28], ebp
cmp eax, ebp
je 0x5f50d5
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp eax, 1
jne 0x5f50d5
mov dword [esi + 8], ebp
mov eax, dword [esi + 0x18]
cmp eax, ebp
je 0x5f50a4
mov eax, dword [0x992004]
mov ecx, edi
push eax
push ebp
call fcn.005f5550
mov eax, dword [esp + 0x14]
mov bl, 1
cmp eax, ebp
jne 0x5f50b3
mov eax, 0x992000
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, dword [esp + 0x14]
pop edi
cmp ecx, ebp
je 0x5f50e3
mov al, byte [ecx - 1]
test al, al
je 0x5f50d9
cmp al, 0xff
je 0x5f50d9
dec al
mov byte [ecx - 1], al
jmp 0x5f50e3
xor bl, bl
jmp 0x5f50ba
dec ecx
push ecx
call fcn.0062b364
add esp, 4
test bl, bl
je 0x5f50f2
mov dword [esi + 4], 0xffffffff
mov byte [esi + 0xc], 0
mov al, bl
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x10]
mov dword fs:[0], ecx
add esp, 0x1c
ret
mov eax, dword [esi]
cmp eax, ebp
je 0x5f511b
push eax
call fcn.005f6100
add esp, 4
mov dword [esi], ebp
mov bl, 1
jmp 0x5f50e7
mov ecx, dword [esp + 0x1c]
pop esi
pop ebp
xor al, al
pop ebx
mov dword fs:[0], ecx
add esp, 0x1c
ret
Function at 0x5f5a00
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ecx
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_FindResourceA]
push ebp
push esi
push edi
xor edi, edi
push 0x9f54ec
push str.E2EE_IDR_DLL
push edi
call ebx
mov esi, eax
test esi, esi
jne 0x5f5a4f
call fcn.00634ca6
mov edi, dword [eax + 0xc]
test edi, edi
jne 0x5f5a34
pop edi
pop esi
pop ebp
xor al, al
pop ebx
pop ecx
ret
push 0x9f54ec
push str.E2EE_IDR_DLL
push edi
call ebx
mov esi, eax
test esi, esi
jne 0x5f5a4f
pop edi
pop esi
pop ebp
xor al, al
pop ebx
pop ecx
ret
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
test ebx, ebx
jne 0x5f5a65
pop edi
pop esi
pop ebp
xor al, al
pop ebx
pop ecx
ret
push esi
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x5f5a79
pop edi
pop esi
pop ebp
xor al, al
pop ebx
pop ecx
ret
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebp, eax
test ebp, ebp
mov dword [esp + 0x10], ebp
jne 0x5f5a92
pop edi
pop esi
pop ebp
xor al, al
pop ebx
pop ecx
ret
mov edi, dword [esp + 0x18]
push edi
push ebx
push ebp
call fcn.005f6200
add esp, 0xc
test al, al
jne 0x5f5b31
mov eax, dword [edi + 8]
cmp eax, ebx
jb 0x5f5b39
mov esi, dword [0x99200c]
jae 0x5f5ac1
call fcn.006279c5
mov ecx, edi
call fcn.005f5d40
mov eax, dword [edi + 8]
mov ecx, eax
sub ecx, ebx
cmp ecx, esi
jae 0x5f5ad5
mov esi, ecx
test esi, esi
jbe 0x5f5b13
mov ecx, dword [edi + 4]
sub eax, esi
sub eax, ebx
push eax
lea eax, [ecx + esi]
add eax, ebx
add ecx, ebx
push eax
push ecx
call fcn.00616ab0
mov ebp, dword [edi + 8]
add esp, 0xc
sub ebp, esi
mov ecx, edi
push 0
push ebp
call fcn.005f5c20
test al, al
je 0x5f5b0f
mov ecx, dword [edi + 4]
mov dword [edi + 8], ebp
mov byte [ecx + ebp], 0
mov ebp, dword [esp + 0x10]
mov edi, dword [edi + 4]
test edi, edi
jne 0x5f5b1f
mov edi, 0x992008
mov ecx, ebx
mov esi, ebp
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
pop ecx
ret
mov edx, ebx
push 0
sub edx, eax
mov ecx, edi
push edx
call fcn.005f5b50
jmp 0x5f5b13
Function at 0x601460
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ecx
mov eax, dword [0xa1f5d8]
xor edx, edx
cmp eax, edx
jne 0x601486
xor eax, eax
mov byte [eax + 0xa1f4d8], al
inc eax
cmp eax, 0x100
jl 0x60146e
mov dword [0xa1f5d8], 1
mov eax, dword [esp + 0xc]
push ebx
mov ebx, dword [esp + 0x14]
push esi
push edi
mov ecx, 0x40
mov esi, 0xa1f4d8
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
cmp eax, edx
mov byte [ebx + 0x100], dl
mov byte [ebx + 0x101], dl
jle 0x601517
xor esi, esi
push ebp
mov byte [esp + 0x20], dl
xor ecx, ecx
mov edi, dword [esp + 0x20]
mov ebp, dword [esp + 0x18]
mov al, byte [esi + ebx]
and edi, 0xff
xor edx, edx
mov dl, byte [edi + ebp]
mov ebp, eax
and ebp, 0xff
add ecx, edx
add ecx, ebp
and ecx, 0x800000ff
jns 0x6014ea
dec ecx
or ecx, 0xffffff00
inc ecx
mov byte [esp + 0x10], cl
mov ecx, dword [esp + 0x10]
and ecx, 0xff
mov dl, byte [ecx + ebx]
mov byte [esi + ebx], dl
mov byte [ecx + ebx], al
lea eax, [edi + 1]
cdq
idiv dword [esp + 0x1c]
inc esi
cmp esi, 0x100
mov byte [esp + 0x20], dl
jl 0x6014b8
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret

Function at 0x601520
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
mov cl, byte [eax + 0x100]
mov dl, byte [eax + 0x101]
mov dword [ebp - 8], eax
mov byte [ebp - 1], cl
mov byte [ebp - 2], dl
xor ebx, ebx
mov bl, byte [ebp - 1]
xor edx, edx
mov dl, byte [ebp - 2]
mov esi, dword [ebp - 8]
mov edi, dword [ebp + 8]
xor eax, eax
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jle 0x601573
inc bl
mov al, byte [esi + ebx]
add dl, al
xchg byte [esi + edx], al
mov byte [esi + ebx], al
add al, byte [esi + edx]
mov al, byte [esi + eax]
xor byte [edi], al
inc edi
dec ecx
jne 0x60155a
mov byte [ebp - 1], bl
mov byte [ebp - 2], dl
mov eax, dword [ebp + 0x10]
mov cl, byte [ebp - 1]
mov dl, byte [ebp - 2]
pop edi
pop esi
mov byte [eax + 0x100], cl
mov byte [eax + 0x101], dl
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x607f00
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x63baae
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, dword [esp + 0x18]
push esi
push edi
mov edi, ecx
mov ecx, dword [esp + 0x1c]
push eax
push ecx
mov ecx, edi
mov dword [esp + 0x10], edi
call fcn.00608820
push 0x10
mov dword [esp + 0x18], 0
mov dword [edi], 0x995a4c
call fcn.0062b33b
mov esi, eax
add esp, 4
mov dword [esp + 0x20], esi
mov al, 1
test esi, esi
mov byte [esp + 0x14], al
je 0x607f93
push 4
mov byte [esi + 8], al
mov dword [esi], 0
mov dword [esi + 4], 0
call fcn.0062b33b
add esp, 4
mov dword [esp + 0x1c], eax
test eax, eax
mov byte [esp + 0x14], 2
je 0x607f8c
push 0
mov ecx, eax
call fcn.005ff0a0
mov dword [esi + 0xc], eax
jmp 0x607f95
xor eax, eax
mov dword [esi + 0xc], eax
jmp 0x607f95
xor esi, esi
mov ecx, dword [esp + 0xc]
mov dword [edi + 0x30], esi
mov dword [edi + 0x34], 0
mov eax, edi
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x10
ret 8
Function at 0x618be3
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x618c03
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00617c6a
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x618c26
test byte [esp + 8], 2
je 0x618c26
call fcn.00617cdd
mov dword [eax], 0xd
call fcn.00617ce6
mov dword [eax], 5
jmp 0x618bff
xor eax, eax
ret

Function at 0x62d9da
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x62da12
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.0062ba55
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.0062ba2d
jmp 0x62da1e
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x62f0cf
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x62f111
call fcn.00634ca6
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x62f111
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x62f108
xor eax, eax
jmp 0x62f119
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.0062f11f
pop edi
pop esi
pop ebx
ret 4

Function at 0x6351d6
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x635204
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x635222
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.0063513c
jmp 0x635222
mov eax, dword [esi + 0x14]
test eax, eax
je 0x635222
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.0063513c
test edi, edi
mov eax, edi
jne 0x63520c
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x4063cc
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
mov eax, section.sect_0
call 0x4063cc
lcall 0x5de5, 0x8b10c483
jmp loc.007c9514
Function at 0x446000
Capabilities:
Accept command line arguments
Access peb ldr_data
Get ntdll base address
Resolve function by parsing pe exports
Terminate process

Disassembly:
call 0x446005
pop ebx
sub ebx, 0x400233
mov edi, dword fs:[0x30]
mov edi, dword [edi + 0xc]
mov edi, dword [edi + 0x1c]
mov edi, dword [edi]
mov edi, dword [edi + 8]
mov dword [ebx + 0x4003c2], edi
mov esi, edi
add esi, dword [esi + 0x3c]
mov esi, dword [esi + 0x78]
add esi, edi
push esi
mov ebp, dword [esi + 0x18]
mov esi, dword [esi + 0x20]
add esi, edi
xor edx, edx
push esi
mov edi, dword [esi]
add edi, dword [ebx + 0x4003c2]
lea esi, [ebx + 0x400387]
mov ecx, 0xf
repe cmpsb byte [esi], byte es:[edi]
jne 0x446057
pop esi
mov edx, esi
pop esi
jmp 0x446068
pop esi
add esi, 4
inc edx
cmp edx, ebp
jb 0x446039
sub esp, 4
jmp 0x446182
sub edx, dword [esi + 0x20]
mov eax, dword [ebx + 0x4003c2]
sub edx, eax
shr edx, 1
add edx, dword [esi + 0x24]
add edx, eax
movzx eax, word [edx]
shl eax, 2
add eax, dword [esi + 0x1c]
add eax, dword [ebx + 0x4003c2]
mov eax, dword [eax]
add eax, dword [ebx + 0x4003c2]
mov edi, eax
mov ebp, esp
mov edx, dword [ebx + 0x4003c2]
lea eax, [ebx + 0x400396]
push eax
push edx
call edi
sub esp, 0x104
push esp
push 0x104
call eax
lea eax, [ebx + 0x4003a3]
push eax
mov edx, dword [ebx + 0x4003c2]
push edx
call edi
lea ecx, [ebx + 0x4003ac]
push ecx
mov ecx, esp
add ecx, 4
push ecx
call eax
lea eax, [ebx + 0x4003b6]
push eax
mov edx, dword [ebx + 0x4003c2]
push edx
call edi
mov ecx, esp
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
push ecx
call eax
mov esi, eax
lea ecx, [ebx + 0x4003ed]
push ecx
push ecx
mov edx, dword [ebx + 0x4003c2]
push edx
call edi
pop ecx
push 0
push ecx
add ecx, 0xa
mov edx, dword [ecx]
push edx
push ecx
mov edx, 0x905a4d
mov dword [ecx], edx
push esi
call eax
lea eax, [ebx + 0x4003d5]
push eax
mov edx, dword [ebx + 0x4003c2]
push edx
call edi
push esi
call eax
lea eax, [ebx + 0x4003c6]
push eax
mov edx, dword [ebx + 0x4003c2]
push edx
call edi
sub esp, 0x44
mov edx, esp
mov esi, 0
mov ecx, 0x11
mov dword [edx], esi
add edx, 4
loop 0x446153
mov edx, 0x44
mov dword [esp], edx
sub esp, 0x10
mov edx, esp
push esp
add edx, 0x10
push edx
push 0
push 0
push 0
push 0
push 0
push 0
push 0
add edx, 0x44
push edx
call eax
mov esp, ebp
jmp fcn.00406c40
Function at 0x4e1b0a
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x404de1
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x408460]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x10], esi
xor edi, edi
mov dword [esi + 0x24], edi
mov dword [ebp - 4], edi
mov dword [esi + 0x2c], edi
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0x10]
mov ebx, dword [ebp + 0x14]
mov dword [esi + 4], ecx
mov ecx, dword [ebp + 0x1c]
mov dword [esi], eax
mov eax, dword [ebp + 0x18]
mov dword [esi + 0x14], ecx
mov cl, byte [ebp + 0x28]
mov dword [esi + 8], edx
mov edx, dword [ebp + 0x20]
mov dword [esi + 0x10], eax
mov eax, dword [ebp + 0x24]
mov byte [ebp - 4], 1
mov dword [esi + 0xc], ebx
mov dword [esi + 0x18], edx
mov dword [esi + 0x1c], eax
mov byte [esi + 0x20], cl
mov dword [esi + 0x30], edi
test cl, cl
jne 0x4e1bdd
mov dword [ebp + 0x28], edi
test eax, eax
je 0x4e1baa
lea ecx, [edx + 0xc]
mov edx, eax
mov eax, dword [ecx]
cmp eax, edi
jbe 0x4e1b94
mov edi, eax
add ecx, 0x10
dec edx
jne 0x4e1b8c
mov dword [ebp + 0x28], edi
mov eax, 0x406784
cmp edi, 0x100000
ja 0x4e1bad
lea eax, [ebp + 0x28]
mov eax, dword [eax]
mov dword [esi + 0x28], eax
add eax, 0xa
push eax
call fcn.004e22aa
mov edi, eax
mov eax, dword [esi + 0x24]
add esp, 4
cmp eax, edi
je 0x4e1bd3
push eax
call fcn.004e2340
add esp, 4
mov dword [esi + 0x24], edi
push 0
call fcn.004e2340
add esp, 4
xor ecx, ecx
mov eax, ebx
mov edx, 0x44
mul edx
seto cl
neg ecx
or ecx, eax
xor eax, eax
add ecx, 4
setb al
neg eax
or eax, ecx
push eax
call fcn.004e22aa
add esp, 4
mov dword [ebp + 0x28], eax
mov byte [ebp - 4], 2
test eax, eax
je 0x4e1c29
push 0x402640
push 0x402600
push ebx
lea edi, [eax + 4]
push 0x44
push edi
mov dword [eax], ebx
call fcn.004e2407
jmp 0x4e1c2b
xor edi, edi
mov eax, dword [esi + 0x2c]
mov byte [ebp - 4], 1
cmp eax, edi
je 0x4e1c5a
test eax, eax
je 0x4e1c57
mov ecx, dword [eax - 4]
lea ebx, [eax - 4]
push 0x402640
push ecx
push 0x44
push eax
call fcn.004e23a4
push ebx
call fcn.004e2340
add esp, 4
mov dword [esi + 0x2c], edi
mov ecx, esi
call fcn.004e174a
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24