Function at 0x500140
Capabilities:
Copy file
Get thread local storage value

Disassembly:
sub esp, 0x1c
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x20], 0
mov edi, 0x8cccd0
mov ebx, eax
lea eax, [esp + 0x10]
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], edi
call fcn.00412f10
mov esi, dword [esp + 0x10]
mov eax, dword [esi - 4]
mov cl, byte [eax + esi - 1]
mov bl, 0x5c
cmp cl, bl
je 0x50018a
push 0x70e1b4
lea eax, [esp + 0x14]
call fcn.00412e50
mov esi, dword [esp + 0x10]
mov al, byte [esi + 1]
cmp al, 0x3a
jne 0x50032e
cmp byte [esi + 2], bl
mov eax, dword [esi - 4]
jne 0x500268
mov ecx, 3
cmp eax, ecx
jge 0x5001ac
mov ecx, eax
test eax, eax
jge 0x5001b2
xor ecx, ecx
cmp ecx, eax
jne 0x5001c5
lea eax, [esp + 0x10]
lea ecx, [esp + 0x1c]
call fcn.00412df0
jmp 0x5001fc
push 0
mov eax, esi
lea edx, [esp + 0x1c]
mov dword [esp + 0x1c], edi
call fcn.004f47b0
lea eax, [esp + 0x18]
lea ecx, [esp + 0x1c]
call fcn.00412df0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff8
je 0x5001fc
cmp eax, 0x8cccc8
je 0x5001fc
push eax
call sub.MSVCR71.dll_void___cdecl_operator_delete___void__
add esp, 4
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x14]
call fcn.00412ec0
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff8
je 0x500222
cmp eax, 0x8cccc8
je 0x500222
push eax
call sub.MSVCR71.dll_void___cdecl_operator_delete___void__
add esp, 4
mov eax, dword [esi - 4]
mov edi, 3
cmp eax, edi
jge 0x500230
mov edi, eax
cmp edi, eax
jne 0x50024b
test eax, eax
je 0x5003db
mov byte [esi], 0
mov dword [esi - 4], 0
jmp 0x5003db
test edi, edi
jle 0x5003db
test eax, eax
jle 0x5003db
sub eax, edi
inc eax
push eax
lea ecx, [edi + esi]
push ecx
jmp 0x500317
mov ecx, 2
cmp eax, ecx
jge 0x500273
mov ecx, eax
test eax, eax
jge 0x500279
xor ecx, ecx
cmp ecx, eax
jne 0x50028c
lea eax, [esp + 0x10]
lea ecx, [esp + 0x18]
call fcn.00412df0
jmp 0x5002c3
push 0
mov eax, esi
lea edx, [esp + 0x20]
mov dword [esp + 0x20], edi
call fcn.004f47b0
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x18]
call fcn.00412df0
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff8
je 0x5002c3
cmp eax, 0x8cccc8
je 0x5002c3
push eax
call sub.MSVCR71.dll_void___cdecl_operator_delete___void__
add esp, 4
lea eax, [esp + 0x18]
lea ecx, [esp + 0x14]
call fcn.00412ec0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff8
je 0x5002e9
cmp eax, 0x8cccc8
je 0x5002e9
push eax
call sub.MSVCR71.dll_void___cdecl_operator_delete___void__
add esp, 4
mov eax, dword [esi - 4]
mov edi, 2
cmp eax, edi
jge 0x5002f7
mov edi, eax
cmp edi, eax
je 0x500234
test edi, edi
jle 0x5003db
test eax, eax
jle 0x5003db
sub eax, edi
inc eax
push eax
lea edx, [edi + esi]
push edx
push esi
call dword [sym.imp.MSVCR71.dll_memmove]
mov eax, dword [esi - 4]
add esp, 0xc
sub eax, edi
mov dword [esi - 4], eax
jmp 0x5003db
cmp byte [esi], bl
jne 0x5003c6
cmp al, bl
lea edi, [esp + 0x10]
lea esi, [esp + 0x24]
jne 0x500384
mov ecx, 2
call fcn.00475fb0
lea ecx, [esp + 0x14]
call fcn.00412ec0
mov eax, dword [esp + 0x24]
add eax, 0xfffffff8
je 0x50036e
cmp eax, 0x8cccc8
je 0x50036e
push eax
call sub.MSVCR71.dll_void___cdecl_operator_delete___void__
add esp, 4
mov eax, 2
xor ecx, ecx
lea ebx, [esp + 0x10]
call fcn.004f3430
mov esi, dword [esp + 0x10]
jmp 0x5003db
mov ecx, 1
call fcn.00475fb0
lea ecx, [esp + 0x14]
call fcn.00412ec0
mov eax, dword [esp + 0x24]
add eax, 0xfffffff8
je 0x5003b0
cmp eax, 0x8cccc8
je 0x5003b0
push eax
call sub.MSVCR71.dll_void___cdecl_operator_delete___void__
add esp, 4
mov eax, 1
xor ecx, ecx
lea ebx, [esp + 0x10]
call fcn.004f3430
mov esi, dword [esp + 0x10]
jmp 0x5003db
mov eax, dword [0x8ccccc]
test eax, eax
je 0x5003db
xor eax, eax
mov byte [0x8cccd0], al
mov dword [0x8ccccc], eax
mov eax, dword [esp + 0x30]
push eax
mov eax, esi
call fcn.00500850
push 4
call fcn.005354b8
add esp, 4
test eax, eax
je 0x50040b
lea ecx, [esp + 0x10]
push ecx
push eax
mov eax, dword [esp + 0x38]
add eax, 0x40
call fcn.004abb50
mov ebp, eax
jmp 0x50040d
xor ebp, ebp
mov al, byte [0x8cccf8]
test al, al
mov dword [esp + 0x1c], ebp
je 0x5004ea
mov edx, dword [esp + 0x30]
mov eax, dword [edx + 0x48]
mov esi, dword [eax - 4]
test esi, esi
je 0x50044a
push esi
push eax
mov eax, dword [ebp]
push eax
call dword [sym.imp.MSVCR71.dll__strnicmp]
add esp, 0xc
test eax, eax
jne 0x50044a
mov eax, esi
xor ecx, ecx
mov ebx, ebp
call fcn.004f3430
push 0x28
call fcn.005354b8
mov esi, eax
add esp, 4
test esi, esi
je 0x5004ac
mov edx, dword [esp + 0x34]
mov ecx, dword [esp + 0x30]
mov edi, dword [ecx + 0x48]
add edx, 0x2c
push edx
lea eax, [esp + 0x28]
push eax
mov eax, ebp
mov ebx, 1
call fcn.00412a60
mov edx, dword [esp + 0x34]
mov ecx, dword [edx + 0x20]
mov eax, dword [eax]
push edi
push ecx
add edx, 0x14
mov ebp, 0x8cccd0
mov dword [esi + 8], ebp
push edx
mov edx, eax
mov dword [esi + 0xc], ebp
xor eax, eax
mov ecx, esi
mov dword [esi + 0x24], 0
call fcn.004ffa50
mov dword [esp + 0x18], esi
jmp 0x5004b8
mov ebx, dword [esp + 0x20]
mov dword [esp + 0x18], 0
test bl, 1
je 0x500578
mov eax, dword [esp + 0x24]
and ebx, 0xfffffffe
add eax, 0xfffffff8
je 0x5004dd
cmp eax, 0x8cccc8
je 0x5004dd
push eax
call sub.MSVCR71.dll_void___cdecl_operator_delete___void__
add esp, 4
mov dword [esp + 0x24], 0x8cccd0
jmp 0x500578
push 0x28
call fcn.005354b8
mov edi, eax
add esp, 4
test edi, edi
je 0x50056c
mov eax, dword [esp + 0x34]
mov ebp, dword [eax + 0x20]
mov ecx, dword [esp + 0x1c]
lea esi, [edi + 8]
mov dword [esi], 0x8cccd0
mov dword [edi + 0xc], 0x8cccd0
lea ebx, [eax + 0x2c]
mov eax, esi
mov dword [edi + 0x24], 0
mov dword [edi + 0x10], ecx
call fcn.00412f10
mov edx, dword [esi]
push edx
call dword [sym.imp.MSVCR71.dll__strlwr]
mov eax, dword [esp + 0x38]
mov ecx, dword [eax + 0x14]
mov dword [edi], ecx
mov edx, dword [eax + 0x18]
mov dword [edi + 4], edx
mov dword [edi + 0x18], ebp
mov eax, dword [edi + 0xc]
mov edx, dword [eax - 4]
xor ecx, ecx
add esp, 4
cmp edx, ecx
je 0x50055b
mov byte [eax], cl
mov eax, dword [edi + 0xc]
mov dword [eax - 4], ecx
mov dword [edi + 0x1c], ecx
mov dword [edi + 0x14], ecx
call fcn.004ffae0
mov dword [esp + 0x18], edi
jmp 0x500574
mov dword [esp + 0x18], 0
mov ebx, dword [esp + 0x20]
mov ecx, dword [esp + 0x34]
add ecx, 0x2c
push ecx
lea eax, [esp + 0x14]
call fcn.00412e50
mov ebp, dword [esp + 0x30]
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x2c]
push eax
lea eax, [ebp + 0x40]
or ebx, 6
call fcn.004abb50
mov esi, dword [eax]
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x1c]
call fcn.004abb50
mov edi, dword [eax]
push esi
push edi
call fcn.005007a0
test al, al
jne 0x5005e6
push 1
push 0
push ebp
push 0x5009f0
push esi
push edi
call dword [sym.imp.KERNEL32.dll_CopyFileExA]
test eax, eax
je 0x5005e6
mov al, byte [ebp + 0x1c]
test al, al
mov byte [esp + 0x34], 0
je 0x5005eb
mov byte [esp + 0x34], 1
test bl, 4
je 0x500614
mov eax, dword [esp + 0x20]
and ebx, 0xfffffffb
add eax, 0xfffffff8
je 0x50060c
cmp eax, 0x8cccc8
je 0x50060c
push eax
call sub.MSVCR71.dll_void___cdecl_operator_delete___void__
add esp, 4
mov dword [esp + 0x20], 0x8cccd0
test bl, 2
je 0x500632
mov eax, dword [esp + 0x28]
add eax, 0xfffffff8
je 0x500632
cmp eax, 0x8cccc8
je 0x500632
push eax
call sub.MSVCR71.dll_void___cdecl_operator_delete___void__
add esp, 4
mov al, byte [esp + 0x34]
test al, al
je 0x500687
mov edi, dword [esp + 0x18]
test edi, edi
je 0x500650
call fcn.004fd770
push edi
call sub.MSVCR71.dll_void___cdecl_operator_delete_void__
add esp, 4
mov esi, dword [esp + 0x1c]
test esi, esi
je 0x50075b
mov eax, dword [esi]
sub eax, 8
je 0x500673
cmp eax, 0x8cccc8
je 0x500673
push eax
call sub.MSVCR71.dll_void___cdecl_operator_delete___void__
add esp, 4
push esi
mov dword [esi], 0x8cccd0
call sub.MSVCR71.dll_void___cdecl_operator_delete_void__
add esp, 4
jmp 0x50075b
call fcn.004fee40
mov ebp, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
jmp 0x5006a0
mov eax, dword [0x728c28]
cmp eax, 0xffffffff
mov esi, dword [0x728c1c]
je 0x5006c3
push eax
call edi
test eax, eax
je 0x5006c3
or edx, 0xffffffff
mov ecx, esi
call fcn.004fc390
jmp 0x5006c8
push 0xffffffffffffffff
push esi
call ebp
mov eax, dword [0x8ccce4]
test eax, eax
mov bl, 1
jbe 0x5006e1
mov eax, dword [0x728c1c]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
xor bl, bl
mov eax, dword [0x728c28]
cmp eax, 0xffffffff
je 0x500725
push eax
call edi
mov esi, eax
test esi, esi
je 0x500725
mov eax, dword [esi + 0x14]
test eax, eax
je 0x500725
cmp eax, 3
je 0x500725
mov ecx, dword [esi + 0x20]
push 1
push ecx
call ebp
test eax, eax
jne 0x50072f
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [esi + 0x30], eax
jne 0x50072f
mov dword [esi + 0x14], 3
call fcn.004fc230
jmp 0x50072f
push 0
push 1
call dword [sym.imp.KERNEL32.dll_SleepEx]
test bl, bl
je 0x5006a0
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x30]
mov ecx, dword [eax + 0x38]
push edx
push ecx
call fcn.004fdf20
mov edx, dword [0x728c1c]
push edx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
call fcn.004feeb0
mov eax, dword [esp + 0x10]
add eax, 0xfffffff8
pop edi
pop esi
pop ebp
pop ebx
je 0x500778
cmp eax, 0x8cccc8
je 0x500778
push eax
call sub.MSVCR71.dll_void___cdecl_operator_delete___void__
add esp, 4
mov eax, dword [esp + 4]
add eax, 0xfffffff8
je 0x500791
cmp eax, 0x8cccc8
je 0x500791
push eax
call sub.MSVCR71.dll_void___cdecl_operator_delete___void__
add esp, 4
add esp, 0x1c
ret 8