Function at 0x40bd70
Capabilities:
Create directory
Delete file
Get file attributes
Set current directory
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5430f3
mov eax, dword fs:[0]
push eax
sub esp, 0x38c
mov eax, dword [0x5a674c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
push 0x556a14
push edi
call fcn.004093b0
add esp, 8
lea ecx, [ebp - 0x36c]
call fcn.0040fda0
mov eax, dword [0x5a7c44]
mov eax, dword [eax + 4]
xor ebx, ebx
mov dword [ebp - 4], ebx
cmp eax, ebx
jne 0x40bdce
xor eax, eax
jmp 0x40bdd1
mov eax, dword [eax + 0x20]
push eax
lea ecx, [ebp - 0x36c]
call fcn.0040fdc0
test al, al
jne 0x40be13
mov ecx, dword [0x5a7c44]
push 0x553feb
push ebx
push ebx
push str.Fail_to_Initialize_http
push 0x1b
call fcn.00407520
lea ecx, [ebp - 0x36c]
mov dword [ebp - 4], 0xffffffff
call fcn.00408c60
xor al, al
jmp 0x40c458
push str.http:__patch.pangyath.com_patch_
lea ecx, [ebp - 0x380]
call fcn.004018e0
push 0x5a7c50
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov esi, dword [edi + 0x41c]
sub esi, dword [edi + 0x418]
mov ecx, dword [0x5a7c44]
mov ecx, dword [ecx + 4]
mov eax, 0x97012e03
imul esi
add edx, esi
sar edx, 9
mov eax, edx
shr eax, 0x1f
add eax, edx
push eax
push ebx
push ebx
mov dword [ebp - 0x38c], ebx
call fcn.00404a90
mov ecx, dword [edi + 0x418]
mov dword [ebp - 0x388], ecx
cmp ecx, dword [edi + 0x41c]
je 0x40c410
add ecx, 0x214
mov dword [ebp - 0x37c], ecx
lea esp, [esp]
mov ecx, dword [ebp - 0x37c]
cmp dword [ecx - 4], 0
je 0x40c3c7
mov eax, dword [ebp - 0x380]
add eax, 0xfffffff0
push eax
call fcn.004021b0
add eax, 0x10
add esp, 4
mov dword [ebp - 0x384], eax
mov ebx, dword [ebp - 0x37c]
mov byte [ebp - 4], 2
test ebx, ebx
jne 0x40becd
xor eax, eax
jmp 0x40bedb
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40bed2
sub eax, edx
push eax
push ebx
lea ecx, [ebp - 0x384]
call fcn.00403be0
xor esi, esi
mov dword [ebp - 0x394], esi
mov dword [ebp - 0x390], esi
push ebx
push 0x5569c0
push edi
call fcn.004093b0
mov ecx, dword [ebx + 0x104]
add esp, 0xc
xor eax, eax
lea edx, [ebp - 0x390]
push edx
mov edx, dword [ebp - 0x380]
mov dword [ebp - 0x394], eax
mov dword [ebp - 0x390], eax
lea eax, [ebp - 0x394]
push eax
push ecx
push edx
push 0x5a7c50
push ebx
push str._temp.zip
lea ecx, [ebp - 0x36c]
call fcn.004100a0
test al, al
jne 0x40c014
cmp esi, 4
jge 0x40bf6b
push 0x556984
push edi
call fcn.004093b0
add esp, 8
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
inc esi
cmp esi, 5
jl 0x40bef6
mov eax, dword [ebp - 0x388]
mov edx, dword [eax + 0x318]
push edx
add eax, 0x214
push eax
lea eax, [ebp - 0x110]
push str._s_size:_d_
push eax
call fcn.00525601
mov edx, dword [ebp - 0x390]
mov eax, dword [ebp - 0x394]
add esp, 0x10
lea ecx, [ebp - 0x110]
push ecx
mov ecx, dword [0x5a7c44]
push edx
push eax
push str.temp.zip
push 0x1c
call fcn.00407520
mov eax, dword [ebp - 0x384]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bfe5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x380]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bdfa
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40bdfa
push 0x5a7c50
lea ecx, [ebp - 0x378]
call fcn.004018e0
push 9
push str._temp.zip
lea ecx, [ebp - 0x378]
mov byte [ebp - 4], 3
call fcn.00403be0
push 0x5a7c50
lea ecx, [ebp - 0x370]
call fcn.004018e0
mov esi, dword [ebp - 0x388]
mov eax, esi
mov byte [ebp - 4], 4
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40c060
sub eax, edx
je 0x40c0ad
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40c070
sub eax, edx
push eax
push esi
lea ecx, [ebp - 0x370]
call fcn.00403be0
mov eax, dword [ebp - 0x370]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x40c0ad
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 0xb7
jne 0x40c474
push 1
push 0x555a00
lea ecx, [ebp - 0x370]
call fcn.00403be0
lea ecx, [ebx - 0x110]
test ecx, ecx
jne 0x40c0cd
xor eax, eax
jmp 0x40c0df
lea eax, [ebx - 0x110]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40c0d6
sub eax, edx
push eax
lea edx, [ebx - 0x110]
push edx
lea ecx, [ebp - 0x370]
call fcn.00403be0
push 0x556954
push edi
call fcn.004093b0
mov eax, dword [ebp - 0x370]
add esp, 8
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ecx, dword [ebp - 0x370]
and eax, 0xfffffffe
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov edx, dword [ebp - 0x370]
mov eax, dword [ebp - 0x378]
add ebx, 0x148
push ebx
push edx
push eax
mov ecx, edi
call fcn.00409180
test al, al
je 0x40c7ca
push 0x556938
push edi
call fcn.004093b0
mov ecx, dword [ebp - 0x378]
add esp, 8
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov edx, dword [ebp - 0x370]
push edx
lea ecx, [ebp - 0x258]
call fcn.0040e6d0
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
mov byte [ebp - 4], 8
xor esi, esi
jmp 0x40c180
push 0x556720
lea ecx, [ebp - 0x258]
call fcn.0040e400
cmp dword [ebp - 0x24c], 0
jne 0x40c1b3
push 0x3e8
call ebx
inc esi
cmp esi, 5
jl 0x40c180
cmp dword [ebp - 0x24c], 0
je 0x40c5b6
lea ecx, [ebp - 0x258]
call fcn.0040e360
lea ecx, [ebp - 0x258]
call fcn.0040e7f0
push eax
lea ecx, [ebp - 0x374]
call fcn.004018e0
lea ecx, [ebp - 0x258]
mov byte [ebp - 4], 9
call fcn.0040eb70
test al, al
je 0x40c276
mov edx, dword [ebp - 0x374]
mov ebx, dword [edx - 0xc]
lea esi, [ebx + 1]
test esi, esi
js 0x40c6a8
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
sub eax, esi
or eax, ecx
jge 0x40c223
push esi
lea ecx, [ebp - 0x374]
call fcn.004013a0
mov edx, dword [ebp - 0x374]
mov byte [ebx + edx], 0x2e
mov eax, dword [ebp - 0x374]
cmp esi, dword [eax - 8]
jg 0x40c6a8
mov dword [eax - 0xc], esi
mov eax, dword [ebp - 0x374]
lea ecx, [ebp - 0x258]
mov byte [esi + eax], 0
call fcn.0040eac0
test eax, eax
jne 0x40c256
xor ecx, ecx
jmp 0x40c269
mov ecx, eax
lea esi, [ecx + 1]
jmp 0x40c260
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x40c260
sub ecx, esi
push ecx
push eax
lea ecx, [ebp - 0x374]
call fcn.00403be0
lea ecx, [ebp - 0x258]
xor bl, bl
call fcn.0040eac0
push eax
push 0x556934
call fcn.00538305
add esp, 8
test eax, eax
je 0x40c2b2
lea ecx, [ebp - 0x258]
call fcn.0040eac0
push eax
push 0x556930
call fcn.00538305
add esp, 8
test eax, eax
jne 0x40c302
lea ecx, [ebp - 0x258]
call fcn.004097f0
mov ecx, dword [ebp - 0x37c]
sub eax, dword [ecx - 8]
cmp eax, 0x2000
sete bl
test bl, bl
je 0x40c302
mov edx, dword [ebp - 0x374]
push 0x5568e8
push edx
lea eax, [ebp - 0x210]
push str._s__s
push eax
call fcn.00525601
add esp, 0x10
push 0
push 0
lea ecx, [ebp - 0x210]
push ecx
call fcn.00433a01
lea ecx, [ebp - 0x258]
call fcn.004097f0
mov edx, dword [ebp - 0x37c]
cmp eax, dword [edx - 8]
je 0x40c320
test bl, bl
je 0x40c6b2
mov eax, dword [ebp - 0x374]
add eax, 0xfffffff0
mov byte [ebp - 4], 8
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c346
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x258]
mov byte [ebp - 4], 4
call fcn.0040e430
mov eax, dword [ebp - 0x370]
add eax, 0xfffffff0
mov byte [ebp - 4], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c37b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x378]
add eax, 0xfffffff0
mov byte [ebp - 4], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c3a1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x384]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c3c7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x38c]
mov ecx, dword [edi + 0x43c]
inc eax
push eax
push 0
push 0x7e8
push ecx
mov dword [ebp - 0x38c], eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov eax, dword [ebp - 0x388]
add dword [ebp - 0x37c], 0x364
add eax, 0x364
mov dword [ebp - 0x388], eax
cmp eax, dword [edi + 0x41c]
jne 0x40be90
push 0x5568c8
push edi
call fcn.004093b0
mov eax, dword [ebp - 0x380]
add eax, 0xfffffff0
add esp, 8
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c444
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x36c]
mov dword [ebp - 4], 0xffffffff
call fcn.00408c60
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00525092
mov esp, ebp
pop ebp
ret
push 0x555a00
lea ecx, [ebp - 0x370]
push ecx
lea edx, [ebp - 0x37c]
push edx
call fcn.0040a360
mov ecx, dword [ebp - 0x388]
add ecx, 0x104
push ecx
push eax
lea edx, [ebp - 0x38c]
push edx
mov byte [ebp - 4], 5
call fcn.0040a360
add esp, 0x18
mov eax, dword [ebp - 0x37c]
add eax, 0xfffffff0
mov byte [ebp - 4], 7
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c4d3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x38c]
push ecx
mov ecx, dword [0x5a7c44]
push esi
push 0
push str.Fail_to_CreateDirectory
push 0x1e
call fcn.00407520
mov eax, dword [ebp - 0x38c]
add eax, 0xfffffff0
mov byte [ebp - 4], 4
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40c515
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x370]
add eax, 0xfffffff0
mov byte [ebp - 4], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c53b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x378]
add eax, 0xfffffff0
mov byte [ebp - 4], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c561
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x384]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c587
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x380]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bdfa
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40bdfa
push 0x5568a4
push edi
call fcn.004093b0
mov ecx, dword [ebp - 0x370]
mov edx, dword [ebp - 0x388]
mov eax, dword [edx + 0x20c]
mov esi, dword [0x5a7c44]
add esp, 8
push ecx
push eax
lea ecx, [ebp - 0x258]
call fcn.004097f0
push eax
push str.Cannot_Open_File
push 0x28
mov ecx, esi
call fcn.00407520
lea ecx, [ebp - 0x258]
mov byte [ebp - 4], 4
call fcn.0040e430
mov eax, dword [ebp - 0x370]
add eax, 0xfffffff0
mov byte [ebp - 4], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c62d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x378]
add eax, 0xfffffff0
mov byte [ebp - 4], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c653
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x384]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c679
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x380]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bdfa
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40bdfa
push 0x80070057
call fcn.00401000
push 0x556938
push edi
call fcn.004093b0
mov ecx, dword [ebp - 0x374]
mov edx, dword [ebp - 0x388]
mov eax, dword [edx + 0x20c]
mov esi, dword [0x5a7c44]
add esp, 8
push ecx
push eax
lea ecx, [ebp - 0x258]
call fcn.004097f0
push eax
push str.Not_same_size___unzip
push 0x1d
mov ecx, esi
call fcn.00407520
mov eax, dword [ebp - 0x374]
add eax, 0xfffffff0
mov byte [ebp - 4], 8
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c71a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x258]
mov byte [ebp - 4], 4
call fcn.0040e430
mov eax, dword [ebp - 0x370]
add eax, 0xfffffff0
mov byte [ebp - 4], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c74f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x378]
add eax, 0xfffffff0
mov byte [ebp - 4], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c775
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x384]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c79b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x380]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bdfa
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40bdfa
push 0x556854
push edi
call fcn.004093b0
mov eax, dword [ebp - 0x370]
add eax, 0xfffffff0
add esp, 8
mov byte [ebp - 4], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c7fe
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x378]
add eax, 0xfffffff0
mov byte [ebp - 4], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c824
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x384]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c84a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x380]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bdfa
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40bdfa