Function at 0x499a00
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x513373
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1ac
push ebx
push esi
push edi
mov ebx, ecx
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x14], ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [ebx + 0x418], eax
mov eax, dword [0x518890]
mov dword [ebx + 0xc4], eax
mov ecx, dword [0x518894]
mov eax, dword [ebx + 0x410]
mov dword [ebx + 0xc8], ecx
mov edx, dword [0x518898]
inc edx
test eax, eax
mov dword [ebx + 0xcc], edx
jne 0x499a75
push 0
call dword [sym.imp.ole32.dll_OleInitialize]
mov dword [ebx + 0x410], 1
lea eax, [ebp - 0x1b8]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [ebp - 0x1b8]
push 0x5c
push ecx
call fcn.004f2597
mov edi, eax
add esp, 8
test edi, edi
je 0x499abb
lea esi, [ebx + 0xd0]
lea edx, [ebp - 0x1b8]
push edx
mov ecx, esi
mov byte [edi], 0
call fcn.005032c1
inc edi
push edi
jmp 0x499acf
lea esi, [ebx + 0xd0]
mov ecx, esi
call fcn.005030c3
lea eax, [ebp - 0x1b8]
push eax
lea ecx, [ebx + 0xd4]
call fcn.005032c1
mov esi, dword [esi]
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push 0x401002
push section..text
push section..text
lea ecx, [ebx + 0x37c]
call fcn.00487a40
push 0x401002
push section..text
push section..text
lea ecx, [ebx + 0x390]
call fcn.00487a40
push 0x401002
push section..text
push section..text
lea ecx, [ebx + 0x3c4]
call fcn.00487a40
push 0x7f00
push 0
call dword [sym.imp.USER32.dll_LoadCursorA]
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0x6eb55c
push 0
push 5
mov esi, eax
call dword [sym.imp.GDI32.dll_GetStockObject]
push eax
push esi
push 0
call fcn.00505805
push eax
push 0x80
lea ecx, [ebx + 0x3d4]
call fcn.00505121
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [ebx + 0x234], eax
mov eax, dword [0x5188a4]
test eax, eax
jbe 0x499bb7
mov ecx, dword [str.Dragon.exe]
lea esi, [ebx + 0x198]
push ecx
mov ecx, esi
call fcn.004643d0
mov edx, dword [0x5188a4]
mov eax, dword [str.Dragon.exe]
add eax, edx
mov ecx, esi
push eax
call fcn.004643d0
mov ebx, dword [0x5188b8]
test ebx, ebx
jle 0x499c65
mov edi, dword [ebp - 0x14]
lea esi, [ebx*4]
push esi
push 0
lea ecx, [edi + 0x170]
call fcn.004648b0
push esi
push 0
lea ecx, [edi + 0x184]
call fcn.004648b0
add edi, 0x148
push esi
push 0
mov ecx, edi
call fcn.004648b0
mov ecx, dword [ebp - 0x14]
push esi
add ecx, 0x15c
push 0
call fcn.004648b0
xor eax, eax
test ebx, ebx
jle 0x499c34
mov edx, dword [0x5188bc]
test eax, eax
mov ecx, dword [edx + eax*4]
jl 0x499c2f
mov edx, dword [edi + 0x10]
shr edx, 2
cmp eax, edx
jge 0x499c2f
mov edx, dword [edi + 8]
mov dword [edx + eax*4], ecx
inc eax
cmp eax, ebx
jl 0x499c12
xor eax, eax
test ebx, ebx
jle 0x499c65
mov ecx, dword [0x5188c0]
test eax, eax
mov ecx, dword [ecx + eax*4]
jl 0x499c60
mov edx, dword [ebp - 0x14]
add edx, 0x15c
mov esi, dword [edx + 0x10]
shr esi, 2
cmp eax, esi
jge 0x499c60
mov edx, dword [edx + 8]
mov dword [edx + eax*4], ecx
inc eax
cmp eax, ebx
jl 0x499c3a
mov ecx, dword [0x5188b0]
xor edi, edi
cmp ecx, edi
jle 0x499cd1
xor esi, esi
cmp ecx, edi
jle 0x499c9f
mov eax, dword [0x5188b4]
mov eax, dword [eax + esi*4]
cmp eax, edi
je 0x499c9a
mov eax, dword [eax + 0x78]
cmp eax, edi
je 0x499c9a
push edi
push 0x475c80
push 1
call eax
mov ecx, dword [0x5188b0]
inc esi
cmp esi, ecx
jl 0x499c77
mov esi, dword [ebp - 0x14]
mov edx, dword [0x5188b4]
shl ecx, 2
push ecx
push edx
lea ecx, [esi + 0x120]
call fcn.004648b0
mov eax, dword [0x5188b0]
lea ecx, [eax*4]
push ecx
push edi
lea ecx, [esi + 0x134]
call fcn.004648b0
cmp dword [0x5188ac], edi
jbe 0x499f32
lea ecx, [ebp - 0x38]
call fcn.00464140
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x40], 0x6b1614
mov dword [ebp - 0x3c], edx
lea ecx, [ebp - 0x48]
mov dword [ebp - 4], edi
call fcn.0050377d
push 0x400
lea ecx, [ebp - 0x70]
mov byte [ebp - 4], 2
call fcn.0050aab6
mov eax, dword [0x5188ac]
mov ecx, dword [0x5188a8]
push edi
push eax
mov bl, 3
push ecx
lea ecx, [ebp - 0x70]
mov byte [ebp - 4], bl
call fcn.0050ab3e
push edi
push 0x1000
lea edx, [ebp - 0x70]
push 1
push edx
lea ecx, [ebp - 0xb4]
call fcn.0050a19a
lea eax, [ebp - 0xb4]
lea ecx, [ebp - 0x40]
push eax
mov byte [ebp - 4], 4
call fcn.00471850
lea ecx, [ebp - 0xb4]
call fcn.0050a2fe
lea ecx, [ebp - 0xb4]
mov byte [ebp - 4], bl
call fcn.0050a276
lea ecx, [ebp - 0x70]
mov byte [ebp - 4], 2
call fcn.0050ab7b
mov dword [ebp - 4], edi
call fcn.005037bb
mov ecx, dword [fcn.00401004]
mov eax, dword [ebp - 0x28]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0x20], ecx
mov ecx, eax
shr ecx, 3
neg eax
sbb eax, eax
and eax, esi
cmp ecx, edi
lea eax, [eax + ecx*4]
jle 0x499e8c
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x1c], ecx
mov eax, dword [eax]
xor ebx, ebx
mov ecx, dword [eax + 0x18]
test ecx, ecx
mov dword [ebp - 0x18], ecx
jle 0x499e76
lea edi, [eax + 0x14]
push 0
push ebx
mov ecx, edi
call fcn.00470660
push ebx
mov ecx, edi
mov esi, eax
call fcn.00470e90
cmp eax, 1
jne 0x499e11
add esi, 0x18
push esi
call fcn.004c2c10
add esi, eax
push esi
call fcn.004c2c10
lea esi, [esi + eax + 0xc]
push esi
call fcn.004c2c10
add esi, eax
add esp, 0xc
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x499e09
mov edx, dword [ebp - 0x20]
add eax, edx
mov dword [esi], eax
jmp 0x499e6a
mov dword [esi], 0
jmp 0x499e6a
add esi, 0x18
push esi
call fcn.004c2c10
add esi, eax
push esi
call fcn.004c2c10
mov ecx, dword [esi + eax + 0x1c]
lea eax, [esi + eax + 0x1c]
mov edx, dword [eax + ecx*4 + 4]
lea eax, [eax + ecx*4 + 4]
lea esi, [edx + eax + 4]
push esi
call fcn.004c2c10
mov ecx, dword [eax + esi + 0xc]
lea eax, [eax + esi + 0xc]
add esp, 0xc
add eax, 8
test ecx, ecx
jle 0x499e6a
mov edx, dword [eax]
cmp edx, 0xffffffff
je 0x499e5e
mov esi, dword [ebp - 0x20]
add edx, esi
mov dword [eax], edx
jmp 0x499e64
mov dword [eax], 0
add eax, 8
dec ecx
jne 0x499e4e
mov eax, dword [ebp - 0x18]
inc ebx
cmp ebx, eax
jl 0x499dc0
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x1c]
add eax, 4
dec ecx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x1c], ecx
jne 0x499dab
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x40]
push eax
add ecx, 0x104
call fcn.00470e10
lea ecx, [ebp - 0x38]
call fcn.00464340
mov dword [ebp - 0x40], 0x6b1614
lea ecx, [ebp - 0x40]
mov dword [ebp - 4], 8
call fcn.00471790
mov dword [ebp - 0x40], 0x6b1620
mov dword [ebp - 4], 9
jmp 0x499f14
lea ecx, [ebp - 0x38]
call fcn.00464340
lea ecx, [ebp - 0x38]
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x38], 0x6af558
call fcn.00464340
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret