Function at 0x1003e0d
Capabilities:
Enumerate files on windows
Get common file path
Set current directory
Terminate process

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x420
mov eax, dword [0x10060b0]
push ebx
push esi
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push edi
xor ebx, ebx
push eax
push dword [ebp + 8]
mov dword [ebp - 0x28c], eax
mov dword [ebp - 0x270], ebx
mov dword [ebp - 0x290], ebx
mov dword [ebp - 0x280], ebx
mov dword [ebp - 0x284], ebx
mov byte [ebp - 0x272], bl
mov byte [ebp - 0x271], bl
call fcn.010027d3
call dword [sym.imp.msvcrt.dll_clock]
push 0x10089c4
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
mov eax, dword [0x10089cc]
mov esi, dword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
or eax, 8
push 0x64
mov word [0x10089c0], ax
pop ecx
xor eax, eax
lea edi, [ebp - 0x420]
rep stosd dword es:[edi], eax
call esi
sub eax, 0x3a4
je 0x1003ef0
sub eax, 4
je 0x1003ee9
sub eax, 0xd
je 0x1003ee2
dec eax
je 0x1003edb
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
and eax, 0x3ff
cmp ax, 0x11
je 0x1003ece
cmp ax, 0x12
je 0x1003ece
cmp ax, 4
mov eax, 0x400
jne 0x1003ed3
mov eax, 0x409
mov dword [0x1006054], ebx
jmp 0x1003ef5
mov eax, 0x404
jmp 0x1003ef5
mov eax, 0x412
jmp 0x1003ef5
mov eax, 0x804
jmp 0x1003ef5
mov eax, 0x411
movzx eax, ax
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadLocale]
mov edi, dword [sym.imp.msvcrt.dll_setlocale]
push 0x10012b0
push ebx
call edi
test eax, eax
pop ecx
pop ecx
jne 0x1003f3e
call esi
cmp eax, ebx
je 0x1003f37
push eax
lea eax, [ebp - 0x10]
push 0x10012a8
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x10]
push eax
push ebx
call edi
add esp, 0x14
test eax, eax
jne 0x1003f3e
push 0x14
jmp 0x1004432
and dword [0x1007774], 0
mov esi, dword [sym.imp.msvcrt.dll__setmode]
push 0x40
pop ecx
mov eax, 0x1010101
mov edi, 0x10087b0
rep stosd dword es:[edi], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
xor ebx, ebx
inc ebx
mov edi, 0x8000
mov byte [0x100778c], bl
mov byte [0x100777c], bl
mov dword [0x1007778], 0x10012a0
push edi
push dword [eax + 0x30]
call esi
mov eax, dword [sym.imp.msvcrt.dll__iob]
push edi
push dword [eax + 0x50]
call esi
and dword [ebp - 0x288], 0
add esp, 0x10
cmp dword [ebp + 8], ebx
mov dword [ebp - 0x27c], ebx
jle 0x1004315
mov ecx, dword [ebp - 0x28c]
mov eax, dword [ebp - 0x27c]
mov eax, dword [ecx + eax*4]
mov cl, byte [eax]
cmp cl, 0x2f
je 0x1003fc6
cmp cl, 0x2d
jne 0x1004181
lea esi, [eax + 1]
mov bl, byte [esi]
test bl, bl
je 0x100416c
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
movsx eax, bl
add eax, 0xffffffc1
cmp eax, 0x39
ja case.0x1003fef.64
movzx eax, byte [eax + 0x100498b]
jmp dword [eax*4 + 0x1004953]
or dword [0x1007774], 8
jmp 0x1004161
or dword [0x1007774], 0x10
jmp 0x1004161
and dword [0x1006060], 0
jmp 0x1004161
mov dword [0x10089dc], 0x1002e80
mov byte [ebp - 0x272], 1
jmp 0x1004161
or dword [0x1007774], 2
jmp 0x1004161
or dword [0x1007774], 4
jmp 0x1004161
mov ebx, 0x1001298
push ebx
push esi
call dword [sym.imp.msvcrt.dll__stricmp]
test eax, eax
pop ecx
pop ecx
je 0x100406e
mov ebx, 0x1001294
push ebx
push esi
call dword [sym.imp.msvcrt.dll__stricmp]
test eax, eax
pop ecx
pop ecx
jne 0x1004081
or byte [0x1007775], 2
push ebx
call edi
lea esi, [esi + eax - 1]
jmp 0x1004161
or byte [0x1007774], 0x80
jmp 0x1004161
or byte [0x1007775], 1
jmp 0x1004161
mov dword [0x10089dc], fcn.01001bfe
mov byte [ebp - 0x271], 1
jmp 0x1004161
mov dword [ebp - 0x288], 1
jmp 0x1004161
mov dword [0x1006094], 0x1003717
jmp 0x1004161
or dword [0x1007774], 0x18
jmp 0x1004161
cmp byte [esi + 1], 0x3a
jne 0x100412d
add esi, 2
cmp byte [esi], 0
je 0x1004281
push esi
call edi
movsx ecx, bl
cmp ecx, 0x61
jg 0x10041f3
je 0x10041a2
cmp ecx, 0x41
je 0x10041a2
cmp ecx, 0x43
je 0x100423a
cmp ecx, 0x44
je 0x100422f
cmp ecx, 0x45
jle 0x1004129
cmp ecx, 0x47
jle 0x100420f
lea esi, [esi + eax - 1]
lea eax, [ebp - 0x278]
push eax
push dword [0x1007778]
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push 6
push eax
mov byte [ebp - 0x278], 0x2f
mov byte [ebp - 0x277], bl
mov byte [ebp - 0x276], 0
call fcn.010029e1
add esp, 0x10
inc esi
mov bl, byte [esi]
test bl, bl
jne 0x1003fd9
inc dword [ebp - 0x27c]
mov eax, dword [ebp - 0x27c]
cmp eax, dword [ebp + 8]
jl 0x1003fa7
cmp byte [ebp - 0x272], 0
je 0x10042c6
cmp byte [ebp - 0x271], 0
je 0x10042ba
push 0x13
jmp 0x1004432
and word [0x10089c0], 0
jmp 0x10041e7
movsx eax, al
push eax
call dword [sym.imp.msvcrt.dll_isxdigit]
test eax, eax
pop ecx
je 0x10041ed
mov al, byte [esi]
cmp al, 0x39
movsx eax, al
jg 0x10041c9
sub eax, 0x30
jmp 0x10041d4
push eax
call dword [sym.imp.msvcrt.dll_tolower]
pop ecx
sub eax, 0x57
mov ecx, dword [0x10089c0]
shl ecx, 4
add ecx, eax
mov word [0x10089c0], cx
inc esi
mov al, byte [esi]
test al, al
jne 0x10041ac
dec esi
jmp 0x1004161
cmp ecx, 0x63
je 0x100423a
cmp ecx, 0x64
je 0x100422f
cmp ecx, 0x65
jle 0x1004129
cmp ecx, 0x67
jg 0x1004129
cmp bl, 0x66
je 0x1004224
cmp bl, 0x46
je 0x1004224
mov dword [ebp - 0x284], esi
jmp 0x1004078
mov dword [ebp - 0x280], esi
jmp 0x1004078
mov dword [ebp - 0x290], esi
jmp 0x1004078
cmp dword [ebp - 0x270], 0x64
mov dword [0x10089dc], 0x1002e80
jge 0x10042b3
mov ecx, dword [ebp - 0x270]
inc dword [ebp - 0x270]
mov dword [ebp + ecx*4 - 0x420], esi
jmp 0x1004078
mov eax, dword [sym.imp.msvcrt.dll__iob]
push 0
add eax, 0x20
push 3
push eax
call fcn.010029e1
add esp, 0xc
push 0
jmp 0x1004800
lea eax, [ebp - 0x278]
push eax
push dword [0x1007778]
mov byte [ebp - 0x278], bl
mov byte [ebp - 0x277], 0
push 0xb
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
call fcn.010029e1
add esp, 0x10
jmp 0x10047fe
push 0x15
jmp 0x1004432
mov dword [0x10089dc], 0x1002e80
jmp 0x10042d9
cmp byte [ebp - 0x271], 0
je 0x10042d9
mov dword [0x10089dc], fcn.01001bfe
cmp dword [ebp - 0x270], 0
je 0x1004315
xor edi, edi
cmp dword [ebp - 0x270], edi
jle 0x1004315
mov esi, dword [ebp + edi*4 - 0x420]
test esi, esi
je 0x1004315
push 0x1001292
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, esi
push eax
push esi
call fcn.01002f28
inc edi
cmp edi, dword [ebp - 0x270]
jl 0x10042ec
mov esi, dword [ebp - 0x27c]
cmp esi, dword [ebp + 8]
jne 0x1004339
cmp dword [0x10089b8], 0
jne 0x1004339
cmp dword [ebp - 0x284], 0
jne 0x1004339
push 1
jmp 0x1004432
mov eax, dword [0x1006074]
mov byte [eax - 1], 0xa
mov eax, dword [0x1006070]
mov byte [eax - 1], 0xa
mov eax, dword [sym.imp.msvcrt.dll__iob]
push dword [eax + 0x30]
call dword [sym.imp.msvcrt.dll__isatty]
test eax, eax
pop ecx
je 0x1004372
mov dword [0x1006098], 0x10030dc
mov dword [0x1006090], 0x10027cd
mov ebx, dword [ebp - 0x284]
test ebx, ebx
je 0x10043f2
push 2
mov edi, 0x1001290
mov esi, ebx
pop ecx
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x10043c3
push 2
mov edi, 0x100128c
mov esi, ebx
pop ecx
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x10043c3
push eax
push eax
push 3
push eax
push eax
push 0x80000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x10043cd
push ebx
push dword [0x1007778]
push 7
jmp 0x100429d
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
push esi
push 0x1001260
push fcn.01002f28
call fcn.0100380c
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
cmp esi, eax
je 0x1004427
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1004427
cmp dword [0x10089b8], 0
jne 0x1004437
mov eax, dword [ebp - 0x28c]
mov ecx, dword [eax + esi*4]
inc esi
mov eax, ecx
mov dword [ebp - 0x27c], esi
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x1004410
sub eax, esi
push 0x1001288
add eax, ecx
push eax
push ecx
call fcn.01002f28
cmp dword [0x10089b8], 0
jne 0x1004437
push 0xc
call fcn.01002bed
cmp dword [0x10089dc], fcn.01001bfe
je 0x10044d0
mov eax, dword [0x1006058]
inc eax
mov dl, al
mov dh, dl
push 0x40
pop ecx
mov edi, 0x10087b0
mov dword [0x10089e0], 0x10028d2
mov eax, edx
shl eax, 0x10
mov ax, dx
rep stosd dword es:[edi], eax
call fcn.01002675
cmp eax, dword [0x10089b8]
je 0x10044b2
mov esi, dword [sym.imp.msvcrt.dll__itoa]
push 0xa
lea ecx, [ebp - 0x24]
push ecx
push eax
call esi
push 0xa
lea eax, [ebp - 0x14]
push eax
push dword [0x10089b8]
call esi
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x24]
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push 8
push eax
call fcn.010029e1
add esp, 0x28
cmp dword [0x10089b8], 1
jne 0x10044e3
cmp dword [0x1006060], 0
je 0x10044e3
mov dword [0x10089e0], 0x1003bc3
jmp 0x10044e3
cmp dword [0x10089e0], 0
jne 0x10044e3
mov dword [0x10089e0], 0x1001e0d
mov ebx, dword [ebp - 0x280]
test ebx, ebx
je 0x10045cf
or dword [0x1007774], 1
push 2
mov edi, 0x1001290
mov esi, ebx
pop ecx
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x100453e
push 2
mov edi, 0x100128c
mov esi, ebx
pop ecx
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x100453e
push 0x1001284
push ebx
call dword [sym.imp.msvcrt.dll_fopen]
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 0x284], eax
jne 0x1004549
push ebx
push dword [0x1007778]
push 9
jmp 0x100429d
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [ebp - 0x284], eax
mov esi, dword [sym.imp.msvcrt.dll_fgets]
push eax
mov edi, 0x105
jmp 0x10045a6
lea eax, [ebp - 0x12c]
push 0x1001260
push eax
call dword [sym.imp.msvcrt.dll_strcspn]
pop ecx
mov byte [ebp + eax - 0x12c], 0
pop ecx
lea eax, [ebp - 0x12c]
push eax
call fcn.01003060
mov ebx, eax
cmp ebx, 0xffffffff
je 0x10045a0
push ebx
lea eax, [ebp - 0x12c]
push eax
push dword [0x1006094]
call fcn.0100380c
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x284]
lea eax, [ebp - 0x12c]
push edi
push eax
call esi
add esp, 0xc
test eax, eax
jne 0x1004557
mov eax, dword [ebp - 0x284]
cmp eax, dword [sym.imp.msvcrt.dll__iob]
je 0x10045f7
push eax
call dword [sym.imp.msvcrt.dll_fclose]
pop ecx
jmp 0x10045f7
mov eax, dword [ebp + 8]
cmp dword [ebp - 0x27c], eax
jne 0x10045f7
and dword [0x1007774], 0xfffffffc
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
push 0
push dword [0x1006094]
call fcn.0100380c
mov ebx, dword [ebp - 0x27c]
mov edx, dword [ebp + 8]
lea eax, [ebx + 1]
cmp edx, eax
jg 0x1004622
cmp dword [ebp - 0x288], 0
jne 0x1004622
mov eax, dword [ebp - 0x28c]
push dword [eax + ebx*4]
call fcn.01002493
test eax, eax
je 0x1004629
or dword [0x1007774], 1
mov eax, dword [ebp - 0x290]
test eax, eax
je 0x1004806
cmp byte [eax], 0
je 0x1004806
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
xor eax, eax
push eax
push eax
mov dword [ebp - 0x270], eax
call esi
mov edi, eax
test edi, edi
je 0x1004695
push edi
call dword [sym.imp.msvcrt.dll_malloc]
test eax, eax
pop ecx
mov dword [ebp - 0x270], eax
jne 0x1004688
push dword [0x1007778]
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push 2
push eax
call fcn.010029e1
add esp, 0xc
jmp 0x10047fe
push dword [ebp - 0x270]
push edi
call esi
test eax, eax
jne 0x10046ae
push dword [ebp - 0x270]
call dword [sym.imp.msvcrt.dll_free]
push dword [0x1007778]
push 0x11
jmp 0x100429d
mov esi, dword [ebp - 0x290]
push 0x3b
push esi
call dword [sym.imp.msvcrt.dll_strchr]
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 0x290], eax
je 0x10046cc
mov byte [eax], 0
cmp byte [esi], 0
je 0x10047b0
xor eax, eax
mov ax, word [0x10089c0]
push eax
push 2
push 0x1001280
call dword [0x1006098]
xor eax, eax
mov ax, word [0x10089c0]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push esi
call dword [0x1006098]
xor eax, eax
mov ax, word [0x10089c0]
push eax
push 3
push 0x100127c
call dword [0x1006098]
push dword [ebp - 0x270]
mov edi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
call edi
test eax, eax
je 0x10047d3
push esi
call edi
test eax, eax
jne 0x1004752
mov eax, dword [sym.imp.msvcrt.dll__iob]
push esi
push dword [0x1007778]
add eax, 0x40
push 4
push eax
call fcn.010029e1
add esp, 0x10
jmp 0x10047b0
mov edi, dword [ebp + 8]
mov eax, dword [ebp - 0x28c]
sub edi, ebx
lea esi, [eax + ebx*4]
jmp 0x1004798
lea eax, [ebp - 0x12c]
push eax
call fcn.01003060
cmp eax, 0xffffffff
mov dword [ebp - 0x280], eax
je 0x1004798
push eax
lea eax, [ebp - 0x12c]
push eax
push dword [0x1006094]
call fcn.0100380c
push dword [ebp - 0x280]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x288]
lea eax, [ebp - 0x12c]
push edi
push esi
push eax
call fcn.01001f53
test eax, eax
jge 0x1004762
mov eax, dword [ebp - 0x290]
test eax, eax
lea esi, [eax + 1]
jne 0x10046b4
push dword [ebp - 0x270]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
jmp 0x1004919
push dword [ebp - 0x270]
call dword [sym.imp.msvcrt.dll_free]
push dword [ebp - 0x270]
mov eax, dword [sym.imp.msvcrt.dll__iob]
push dword [0x1007778]
add eax, 0x40
push 4
push eax
call fcn.010029e1
add esp, 0x14
push 2
call dword [sym.imp.msvcrt.dll_exit]
cmp dword [ebp - 0x288], 0
je 0x1004871
cmp edx, ebx
jle 0x1004919
mov edi, dword [ebp + 8]
mov eax, dword [ebp - 0x28c]
sub edi, ebx
lea esi, [eax + ebx*4]
jmp 0x1004854
lea eax, [ebp - 0x12c]
push eax
call fcn.01003060
mov ebx, eax
cmp ebx, 0xffffffff
je 0x1004854
push ebx
lea eax, [ebp - 0x12c]
push eax
push dword [0x1006094]
call fcn.0100380c
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x288]
lea eax, [ebp - 0x12c]
push edi
push esi
push eax
call fcn.01001f53
test eax, eax
jge 0x1004827
jmp 0x1004919
cmp ebx, edx
jge 0x1004919
mov eax, dword [ebp - 0x28c]
sub edx, ebx
lea esi, [eax + ebx*4]
mov dword [ebp - 0x280], edx
lea eax, [ebp - 0x26c]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x10048bd
push dword [esi]
mov eax, dword [sym.imp.msvcrt.dll__iob]
push dword [0x1007778]
add eax, 0x40
push 4
push eax
call fcn.010029e1
add esp, 0x10
jmp 0x100490a
push dword [esi]
lea eax, [ebp - 0x240]
push eax
call fcn.01003b62
lea eax, [ebp - 0x240]
push eax
call fcn.01003060
mov edi, eax
cmp edi, 0xffffffff
je 0x10048f8
push edi
lea eax, [ebp - 0x240]
push eax
push dword [0x1006094]
call fcn.0100380c
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x26c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x10048bd
add esi, 4
dec dword [ebp - 0x280]
jne 0x100488a
call dword [0x1006090]
cmp byte [0x10089db], 0
pop edi
pop esi
pop ebx
je 0x1004944
push dword [0x1007778]
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push 0x16
push eax
call fcn.010029e1
add esp, 0xc
mov ecx, dword [ebp - 4]
mov eax, dword [0x1006068]
call fcn.01004a3d
leave
ret