Function at 0x42156b
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov edx, dword [ebp + 0x14]
push ebx
push esi
xor esi, esi
test dl, dl
mov dword [ebp - 0x1c], 0xc
mov dword [ebp - 0x18], esi
jns 0x42156b
mov dword [ebp - 0x14], esi
mov byte [ebp - 1], 0x10
jmp 0x421576
mov dword [ebp - 0x14], 1
mov byte [ebp - 1], 0
mov eax, 0x8000
test eax, edx
jne 0x421590
test dh, 0x40
jne 0x42158c
cmp dword [0x44c1ec], eax
je 0x421590
or byte [ebp - 1], 0x80
push 3
mov eax, edx
pop ebx
and eax, ebx
sub eax, esi
je 0x4215b3
dec eax
je 0x4215aa
dec eax
jne 0x4215ce
mov dword [ebp - 0x10], 0xc0000000
jmp 0x4215ba
mov dword [ebp - 0x10], 0x40000000
jmp 0x4215ba
mov dword [ebp - 0x10], SysReAllocStringLen
cmp ecx, 0x10
je 0x4215ff
cmp ecx, 0x20
je 0x4215f6
cmp ecx, 0x30
je 0x4215ed
cmp ecx, 0x40
je 0x4215e8
call fcn.00418f86
mov dword [eax], 0x16
call fcn.00418f8f
mov dword [eax], esi
or eax, 0xffffffff
jmp 0x4217df
mov dword [ebp - 8], ebx
jmp 0x421602
mov dword [ebp - 8], 2
jmp 0x421602
mov dword [ebp - 8], 1
jmp 0x421602
mov dword [ebp - 8], esi
mov eax, edx
mov edx, 0x700
and eax, edx
mov ecx, 0x400
cmp eax, ecx
push edi
mov edi, 0x100
jg 0x421649
je 0x421644
cmp eax, esi
je 0x421644
cmp eax, edi
je 0x42163b
cmp eax, 0x200
je 0x421675
cmp eax, 0x300
jne 0x42165b
mov dword [ebp - 0xc], 2
jmp 0x421685
mov dword [ebp - 0xc], 4
jmp 0x421685
mov dword [ebp - 0xc], ebx
jmp 0x421685
cmp eax, 0x500
je 0x42167e
cmp eax, 0x600
je 0x421675
cmp eax, edx
je 0x42167e
call fcn.00418f86
mov dword [eax], 0x16
call fcn.00418f8f
mov dword [eax], esi
or eax, 0xffffffff
jmp 0x4217de
mov dword [ebp - 0xc], 5
jmp 0x421685
mov dword [ebp - 0xc], 1
mov eax, dword [ebp + 0x14]
test edi, eax
mov esi, 0x80
je 0x4216a3
mov ecx, dword [0x44bd30]
not ecx
and ecx, dword [ebp + 0x18]
test cl, cl
js 0x4216a3
xor esi, esi
inc esi
test al, 0x40
je 0x4216be
or byte [ebp - 0xe], 1
or esi, 0x4000000
cmp dword [0x44bd34], 2
jne 0x4216be
or dword [ebp - 8], 4
test ah, 0x10
je 0x4216c5
or esi, edi
test al, 0x20
je 0x4216d1
or esi, 0x8000000
jmp 0x4216db
test al, 0x10
je 0x4216db
or esi, 0x10000000
call fcn.00421274
mov edi, eax
or ebx, 0xffffffff
cmp edi, ebx
jne 0x421703
call fcn.00418f86
mov dword [eax], 0x18
call fcn.00418f8f
and dword [eax], 0
mov eax, ebx
jmp 0x4217de
mov eax, dword [ebp + 8]
push 0
push esi
push dword [ebp - 0xc]
mov dword [eax], 1
mov eax, dword [ebp + 0xc]
mov dword [eax], edi
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 8]
push dword [ebp - 0x10]
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, ebx
je 0x421742
push esi
call dword [sym.imp.KERNEL32.dll_GetFileType]
test eax, eax
jne 0x421751
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00418f98
pop ecx
jmp 0x4216fc
cmp eax, 2
jne 0x42175c
or byte [ebp - 1], 0x40
jmp 0x421765
cmp eax, 3
jne 0x421765
or byte [ebp - 1], 8
push esi
push edi
call fcn.00421076
or byte [ebp - 1], 1
mov eax, edi
sar eax, 5
lea ebx, [eax*4 + 0x44c3a0]
mov eax, edi
and eax, 0x1f
lea esi, [eax + eax*8]
mov al, byte [ebp - 1]
pop ecx
pop ecx
mov ecx, dword [ebx]
shl esi, 2
mov byte [ebp - 1], al
and byte [ebp - 1], 0x48
mov byte [esi + ecx + 4], al
jne 0x4217c7
test al, al
jns 0x4217c7
test byte [ebp + 0x14], 2
je 0x4217c7
push 2
push 0xffffffffffffffff
push edi
call fcn.00420e62
add esp, 0xc
cmp eax, 0xffffffff
mov dword [ebp - 0x10], eax
jne 0x4217e3
call fcn.00418f8f
cmp dword [eax], 0x83
jne 0x421822
cmp byte [ebp - 1], 0
jne 0x4217dc
test byte [ebp + 0x14], 8
je 0x4217dc
mov eax, dword [ebx]
lea eax, [esi + eax + 4]
or byte [eax], 0x20
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret
push 1
lea eax, [ebp - 2]
push eax
push edi
mov byte [ebp - 2], 0
call fcn.0041c862
add esp, 0xc
test eax, eax
jne 0x421810
cmp byte [ebp - 2], 0x1a
jne 0x421810
push dword [ebp - 0x10]
push edi
call fcn.00423cf9
cmp eax, 0xffffffff
pop ecx
pop ecx
je 0x421822
push 0
push 0
push edi
call fcn.00420e62
add esp, 0xc
cmp eax, 0xffffffff
jne 0x4217c7
push edi
call fcn.0041c36e
pop ecx
jmp 0x42166d