Function at 0x402d30
Capabilities:
Copy file
Query environment variable

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xe94
mov eax, dword [0x41f050]
xor eax, esp
mov dword [esp + 0xe90], eax
push ebx
push esi
push edi
xor ebx, ebx
push 0x7ff
lea eax, [esp + 0x69d]
push ebx
push eax
mov byte [esp + 0x6a4], bl
call fcn.004100c0
add esp, 0xc
push 0x104
lea ecx, [esp + 0x6d]
push ebx
push ecx
mov byte [esp + 0x74], bl
call fcn.004100c0
add esp, 0xc
push 0x104
lea edx, [esp + 0x175]
push ebx
push edx
mov byte [esp + 0x17c], bl
call fcn.004100c0
add esp, 0xc
push 0x104
lea eax, [esp + 0x385]
push ebx
push eax
mov byte [esp + 0x38c], bl
call fcn.004100c0
add esp, 0xc
push 0x104
lea ecx, [esp + 0x27d]
push ebx
push ecx
mov byte [esp + 0x284], bl
call fcn.004100c0
add esp, 0xc
push 0x209
lea edx, [esp + 0x48d]
push ebx
push edx
mov byte [esp + 0x494], bl
call fcn.004100c0
add esp, 0xc
push 0x8007
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 0x41c8dc
lea ecx, [esp + 0x27c]
call fcn.00404480
add esp, 4
call fcn.00402810
test eax, eax
jne 0x4030a4
call fcn.00402980
test eax, eax
jne 0x4030a4
call fcn.004038a0
test eax, eax
jne 0x402e5d
call fcn.004034c0
test eax, eax
jne 0x402e5d
call fcn.00403400
test eax, eax
jne 0x402e5d
call fcn.00403210
test eax, eax
jne 0x402e5d
call fcn.00403f40
test eax, eax
je 0x402e77
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xe90]
xor ecx, esp
call fcn.004089ca
mov esp, ebp
pop ebp
ret 0x10
push 0x41c8e8
lea ecx, [esp + 0x384]
call fcn.00404480
add esp, 4
push 0x41c8f4
lea ecx, [esp + 0x174]
call fcn.00404480
add esp, 4
lea eax, [esp + 0x170]
push eax
lea ecx, [esp + 0x384]
push ecx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
cmp edi, ebx
je 0x4030a4
mov edx, dword [0x4d5428]
mov esi, dword [edx]
call fcn.00406080
test eax, eax
je 0x4030bd
call fcn.004020c0
test eax, eax
je 0x402ef2
call fcn.00405780
cmp eax, 2
je 0x4030a4
mov eax, dword [0x4d5424]
cmp eax, 1
jne 0x402fe0
push 0x105
lea eax, [esp + 0x6c]
push eax
lea ecx, [esp + 0x280]
push ecx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
test eax, eax
je 0x4030a4
mov edx, dword [0x4d5428]
mov eax, dword [edx]
push 0x5c
push eax
call fcn.00409740
add esp, 8
cmp eax, ebx
je 0x4030a4
push eax
lea eax, [esp + 0x6c]
push 0x105
push eax
call fcn.0040976d
mov edx, dword [0x4d5428]
mov eax, dword [edx]
add esp, 0xc
push ebx
lea ecx, [esp + 0x6c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x4030a4
mov ecx, 0x44
lea eax, [esp + 0x20]
mov byte [eax], bl
inc eax
sub ecx, 1
jne 0x402f74
mov dword [esp + 0x20], 0x44
mov ecx, 0x10
lea eax, [esp + 0x10]
lea ecx, [ecx]
mov byte [eax], bl
inc eax
sub ecx, 1
jne 0x402f90
mov ecx, dword [0x4d5428]
mov edx, dword [ecx]
push edx
lea eax, [esp + 0x6c]
push eax
push str._s___s_
lea ecx, [esp + 0x6a4]
push 0x800
push ecx
call fcn.00408ef8
add esp, 0x14
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x24]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
lea ecx, [esp + 0x6b8]
push ecx
push ebx
call edi
jmp 0x4030a4
cmp eax, 2
jne 0x4030a4
mov edx, dword [0x4d5428]
mov ebx, dword [edx + 4]
call fcn.00404580
mov eax, dword [0x4d5428]
mov ecx, dword [eax + 4]
mov eax, dword [eax]
push ecx
call fcn.00405ed0
add esp, 4
test eax, eax
je 0x403093
mov ecx, 0x44
lea eax, [esp + 0x20]
jmp 0x403020
mov byte [eax], 0
inc eax
sub ecx, 1
jne 0x403020
mov dword [esp + 0x20], 0x44
mov ecx, 0x10
lea eax, [esp + 0x10]
lea ebx, [ebx]
mov byte [eax], 0
inc eax
sub ecx, 1
jne 0x403040
mov edx, dword [0x4d5428]
mov eax, dword [edx + 4]
push eax
push str.__s_
lea ecx, [esp + 0x6a0]
push 0x800
push ecx
call fcn.00408ef8
add esp, 0x10
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x24]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
lea ecx, [esp + 0x6b8]
push ecx
push 0
call edi
test eax, eax
je 0x4030a4
mov edx, dword [0x4d5428]
mov eax, dword [edx]
push eax
call fcn.00402140
add esp, 4
mov ecx, dword [esp + 0xe9c]
pop edi
pop esi
pop ebx
xor ecx, esp
xor eax, eax
call fcn.004089ca
mov esp, ebp
pop ebp
ret 0x10
cmp dword [0x4d5424], 3
jne 0x403093
mov eax, dword [0x4d5428]
mov ecx, dword [eax + 8]
mov edx, dword [eax]
push ecx
push edx
push str._s__s
lea eax, [esp + 0x494]
push 0x20a
push eax
call fcn.00408ef8
add esp, 0x14
lea ecx, [esp + 0x488]
push ecx
jmp 0x40309c