Function at 0x59cf36
Capabilities:
Create directory
Move file

Disassembly:
push ebp
sub esp, 0x74
mov eax, 0x6a68a2
call fcn.006375a8
sub esp, 0x1c
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp], ebx
push dword [0x77d620]
call fcn.00480435
mov edi, eax
test edi, edi
je 0x59d26c
push edi
call fcn.0047fb99
test al, al
jne 0x59cf79
push edi
call fcn.0047fb5e
jmp 0x59d26c
push 0x6b7a2c
lea eax, [ebp - 0x28]
push eax
call fcn.00470ce5
cmp dword [ebp - 0x14], 8
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], ebx
jae 0x59cf96
lea eax, [ebp - 0x28]
push ebx
push eax
call dword [sym.imp.KERNEL32.DLL_CreateDirectoryW]
xor eax, eax
mov dword [ebp + 0x68], 7
mov dword [ebp + 0x64], ebx
mov word [ebp + 0x54], ax
mov esi, ebx
mov dword [ebp + 0x74], esi
mov eax, ebx
mov byte [ebp - 4], 2
mov dword [ebp + 0x6c], eax
cmp dword [edi + 0x34], eax
je 0x59d1e0
lea ecx, [edi + 0x24]
push eax
call fcn.005302e7
mov ebx, eax
cmp dword [ebx + 0x14], 0x10
jb 0x59cfd8
mov ebx, dword [ebx]
push ebx
lea eax, [ebp + 0x34]
push eax
call fcn.0047af87
cmp dword [ebp + 0x48], 8
mov eax, dword [ebp + 0x34]
mov byte [ebp - 4], 3
jae 0x59cff2
lea eax, [ebp + 0x34]
push 0x6b780c
push eax
call fcn.0047b193
test al, al
je 0x59d184
lea eax, [ebp + 0x50]
push eax
push ebx
push edi
call fcn.00581f5e
push 0
mov ebx, eax
lea eax, [ebp + 0x1c]
push 0x6b780c
push eax
call fcn.0045ea02
push eax
lea ecx, [ebp + 0x54]
call fcn.0042623d
push 0
push 1
lea ecx, [ebp + 0x1c]
call fcn.004267c2
cmp dword [ebp + 0x68], 8
mov eax, dword [ebp + 0x54]
jae 0x59d043
lea eax, [ebp + 0x54]
push dword [ebp + 0x50]
push ebx
push eax
call fcn.00461ae3
test al, al
je 0x59d15b
and dword [ebp + 0x2c], 0
xor eax, eax
mov dword [ebp + 0x30], 7
mov word [ebp + 0x1c], ax
lea eax, [ebp + 0x1c]
mov byte [ebp - 4], 4
push eax
sub esp, 0x18
lea eax, [ebp + 0x54]
mov ecx, esp
push eax
call fcn.0042615e
lea eax, [ebp + 0x4c]
push eax
call fcn.0048730b
push eax
lea ecx, [ebp + 0x74]
mov byte [ebp - 4], 5
call fcn.00486a88
mov ecx, dword [ebp + 0x4c]
mov byte [ebp - 4], 6
test ecx, ecx
je 0x59d0a2
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp + 0x74]
mov byte [ebp - 4], 4
test esi, esi
je 0x59d122
lea eax, [esi + 0xcc]
cmp dword [eax + 0x14], 0x10
jb 0x59d0bb
mov eax, dword [eax]
push eax
lea eax, [ebp + 4]
push eax
call fcn.00481613
cmp dword [ebp + 0x18], 8
mov ecx, dword [ebp + 4]
mov byte [ebp - 4], 7
jae 0x59d0d5
lea ecx, [ebp + 4]
cmp dword [ebp + 0x68], 8
mov eax, dword [ebp + 0x54]
jae 0x59d0e1
lea eax, [ebp + 0x54]
push ecx
push eax
call dword [sym.imp.KERNEL32.DLL_MoveFileW]
test eax, eax
jne 0x59d114
cmp dword [ebp + 0x18], 8
mov ecx, dword [ebp + 4]
jae 0x59d0f9
lea ecx, [ebp + 4]
cmp dword [ebp + 0x68], 8
mov eax, dword [ebp + 0x54]
jae 0x59d105
lea eax, [ebp + 0x54]
push ecx
push eax
push str.Failed_to_install_bundled_btapp:__s_to:__s
call fcn.00479c3c
add esp, 0xc
push 0
push 1
lea ecx, [ebp + 4]
call fcn.004267c2
jmp 0x59d149
cmp dword [ebp + 0x30], 8
mov ecx, dword [ebp + 0x1c]
jae 0x59d12e
lea ecx, [ebp + 0x1c]
cmp dword [ebp + 0x48], 8
mov eax, dword [ebp + 0x34]
jae 0x59d13a
lea eax, [ebp + 0x34]
push ecx
push eax
push str.Bundled_btapp___s__is_ill_formed:__s
call fcn.00479c3c
add esp, 0xc
push 0
push 1
lea ecx, [ebp + 0x1c]
mov byte [ebp - 4], 3
call fcn.004267c2
jmp 0x59d1b5
cmp dword [ebp + 0x68], 8
mov ecx, dword [ebp + 0x54]
jae 0x59d167
lea ecx, [ebp + 0x54]
cmp dword [ebp + 0x48], 8
mov eax, dword [ebp + 0x34]
jae 0x59d173
lea eax, [ebp + 0x34]
push ecx
push eax
push str.Failed_to_unpack_bundled_btapp:__s_to:__s
call fcn.00479c3c
add esp, 0xc
jmp 0x59d1b5
push 0x7076cc
lea ecx, [ebp + 0x34]
call fcn.00437471
test eax, eax
jne 0x59d1bd
lea eax, [ebp + 0x70]
push eax
push ebx
push edi
call fcn.00581f5e
cmp dword [ebp + 0x70], 0
mov ebx, eax
je 0x59d1b5
test ebx, ebx
je 0x59d1b5
push dword [ebp + 0x70]
push ebx
call fcn.0059d5bc
push 1
push ebx
call fcn.0045e47c
push 0
push 1
lea ecx, [ebp + 0x34]
mov byte [ebp - 4], 2
call fcn.004267c2
mov eax, dword [ebp + 0x6c]
lea ecx, [edi + 0x24]
inc eax
mov dword [ebp + 0x6c], eax
cmp eax, dword [edi + 0x34]
jne 0x59cfc8
push edi
call fcn.0047fb5e
test esi, esi
je 0x59d1fe
lea eax, [esi + 0xcc]
push eax
lea ecx, [ebp + 4]
call fcn.0040da7b
xor ebx, ebx
inc ebx
jmp 0x59d20e
push 0x73938c
lea ecx, [ebp + 0x1c]
call fcn.0040d4cf
push 2
pop ebx
push eax
mov ecx, 0x79fe64
call fcn.0040d122
test bl, 2
je 0x59d22d
push 0
push 1
lea ecx, [ebp + 0x1c]
and ebx, 0xfffffffd
call fcn.0040daff
mov dword [ebp - 4], 2
test bl, 1
je 0x59d245
push 0
push 1
lea ecx, [ebp + 4]
call fcn.0040daff
mov byte [ebp - 4], 9
test esi, esi
je 0x59d254
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
push 0
push 1
lea ecx, [ebp + 0x54]
call fcn.004267c2
push 0
push 1
lea ecx, [ebp - 0x28]
call fcn.004267c2
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
lea esp, [ebp + 0x78]
pop ebp
ret