Function at 0x403500
Capabilities:
Create directory
Write file on windows

Disassembly:
sub esp, 0x248
push esi
mov esi, ecx
mov byte [esp + 7], 1
mov eax, dword [esi + 0xf8]
test eax, eax
jne 0x403522
xor al, al
pop esi
add esp, 0x248
ret
mov ecx, dword [esi + 0x108]
push edi
push ebp
push ebx
mov eax, dword [ecx]
mov dword [esp + 0x2c], 0xffffffff
mov dword [esp + 0x18], 4
call dword [eax + 0x18]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x20], eax
and eax, 0xffff
and ecx, 0xffff
mov ebp, 2
push eax
lea edx, [ecx + eax + 0x14]
mov dword [esp + 0x38], 0
mov dword [esp + 0x28], ebp
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x20], ebp
mov dword [esp + 0x34], edx
call fcn.0040a590
add esp, 4
mov dword [esp + 0x28], eax
test eax, eax
je 0x403a72
mov edx, dword [esi + 0xf8]
xor eax, eax
mov ecx, 6
lea edi, [esp + 0x3c]
push eax
push eax
rep stosd dword es:[edi], eax
lea eax, [esp + 0x160]
lea ecx, [esp + 0x5c]
push eax
push ecx
push edx
call fcn.0040a750
add esp, 0x14
lea eax, [esp + 0x158]
push 0x4110b0
push eax
call fcn.0040a970
mov edi, eax
add esp, 8
test edi, edi
je 0x40362d
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcatA]
mov ebx, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea ecx, [esp + 0x54]
push 0x4110ac
push ecx
call ebp
lea edx, [esp + 0x54]
push edi
push edx
call ebp
lea eax, [esp + 0x54]
push 0
push eax
call fcn.0040a8d0
add esp, 8
test eax, eax
je 0x403613
lea ecx, [esp + 0x54]
push 0
push ecx
call ebx
test eax, eax
je 0x403a72
push 0x4110b0
push 0
call fcn.0040a970
mov edi, eax
add esp, 8
test edi, edi
jne 0x4035db
mov ebp, 2
mov edx, dword [esi + 0xf8]
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push pe_nt_image_headers32
push ebp
push 0
push 3
push 0xc0000000
push edx
call ebx
cmp eax, 0xffffffff
mov dword [esi + 0x28], eax
je 0x403a72
push 0
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x403a72
mov edx, dword [esi + 0x28]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [esp + 0x14]
push 0
push eax
lea ecx, [esp + 0x38]
push 4
push ecx
push edx
call edi
test eax, eax
je 0x403a72
cmp dword [esp + 0x14], 4
jb 0x403a72
mov ecx, dword [esi + 0x28]
lea eax, [esp + 0x14]
push 0
push eax
push 8
push str.ADGW_SDK
push ecx
call edi
test eax, eax
je 0x403a72
cmp dword [esp + 0x14], 8
jb 0x403a72
mov ecx, dword [esi + 0x28]
lea edx, [esp + 0x14]
push 0
push edx
lea eax, [esp + 0x28]
push ebp
push eax
push ecx
call edi
test eax, eax
je 0x403a72
cmp dword [esp + 0x14], ebp
jb 0x403a72
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x28]
lea edx, [esp + 0x14]
push 0
and eax, 0xffff
push edx
mov edx, dword [esi + 0x28]
push eax
push ecx
push edx
call edi
test eax, eax
je 0x403a72
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x14]
and eax, 0xffff
cmp ecx, eax
jb 0x403a72
mov eax, dword [esi + 0x28]
lea ecx, [esp + 0x14]
push 0
push ecx
lea edx, [esp + 0x24]
push ebp
push edx
push eax
call edi
test eax, eax
je 0x403a72
cmp dword [esp + 0x14], ebp
jb 0x403a72
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x14]
push 0
and edx, 0xffff
push ecx
mov ecx, dword [esi + 0x28]
lea eax, [esp + 0x40]
push edx
push eax
push ecx
call edi
test eax, eax
je 0x403a72
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
and edx, 0xffff
cmp eax, edx
jb 0x403a72
mov edx, dword [esi + 0x28]
lea eax, [esp + 0x14]
push 0
push eax
lea ecx, [esp + 0x2c]
push ebp
push ecx
push edx
call edi
test eax, eax
je 0x403a72
cmp dword [esp + 0x14], ebp
jb 0x403a72
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0x14]
push 0
and ecx, 0xffff
push eax
mov eax, dword [esi + 0x28]
lea edx, [esp + 0x3c]
push ecx
push edx
push eax
call edi
test eax, eax
je 0x403a72
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x14]
and ecx, 0xffff
cmp eax, ecx
jb 0x403a72
mov ecx, dword [esi + 0x28]
lea edx, [esp + 0x14]
push 0
push edx
lea eax, [esp + 0x20]
push ebp
push eax
push ecx
call edi
test eax, eax
je 0x403a72
cmp dword [esp + 0x14], ebp
jb 0x403a72
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x14]
push 0
and eax, 0xffff
push edx
mov edx, dword [esi + 0x28]
lea ecx, [esp + 0x34]
push eax
push ecx
push edx
call edi
test eax, eax
je 0x403a72
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
and eax, 0xffff
cmp ecx, eax
jb 0x403a72
mov ecx, dword [esi + 0x28]
push ecx
mov ecx, esi
call fcn.00405360
test al, al
je 0x403a72
mov edx, dword [esi + 0xfc]
push 0
push pe_nt_image_headers32
push ebp
push 0
push 3
push 0xc0000000
push edx
call ebx
cmp eax, 0xffffffff
mov dword [esi + 0x2c], eax
je 0x403a72
push 0
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x403a72
mov edx, dword [esi + 0x2c]
lea eax, [esp + 0x14]
push 0
push eax
lea ecx, [esp + 0x38]
push 4
push ecx
push edx
call edi
test eax, eax
je 0x403a72
cmp dword [esp + 0x14], 4
jb 0x403a72
mov ecx, dword [esi + 0x2c]
lea eax, [esp + 0x14]
push 0
push eax
push 8
push str.ADGW_IDX
push ecx
call edi
test eax, eax
je 0x403a72
cmp dword [esp + 0x14], 8
jb 0x403a72
mov ecx, dword [esi + 0x2c]
lea edx, [esp + 0x14]
push 0
push edx
lea eax, [esp + 0x28]
push ebp
push eax
push ecx
call edi
test eax, eax
je 0x403a72
cmp dword [esp + 0x14], ebp
jb 0x403a72
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x28]
lea edx, [esp + 0x14]
push 0
and eax, 0xffff
push edx
mov edx, dword [esi + 0x2c]
push eax
push ecx
push edx
call edi
test eax, eax
je 0x403a72
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x14]
and eax, 0xffff
cmp ecx, eax
jb 0x403a72
mov eax, dword [esi + 0x2c]
lea ecx, [esp + 0x14]
push 0
push ecx
lea edx, [esp + 0x24]
push ebp
push edx
push eax
call edi
test eax, eax
je 0x403a72
cmp dword [esp + 0x14], ebp
jb 0x403a72
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x14]
push 0
and edx, 0xffff
push ecx
mov ecx, dword [esi + 0x2c]
lea eax, [esp + 0x40]
push edx
push eax
push ecx
call edi
test eax, eax
je 0x403a72
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
and edx, 0xffff
cmp eax, edx
jb 0x403a72
mov edx, dword [esi + 0x2c]
lea eax, [esp + 0x14]
push 0
push eax
lea ecx, [esp + 0x2c]
push ebp
push ecx
push edx
call edi
test eax, eax
je 0x403a72
cmp dword [esp + 0x14], ebp
jb 0x403a72
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0x14]
push 0
and ecx, 0xffff
push eax
mov eax, dword [esi + 0x2c]
lea edx, [esp + 0x3c]
push ecx
push edx
push eax
call edi
test eax, eax
je 0x403a72
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x14]
and ecx, 0xffff
cmp eax, ecx
jb 0x403a72
mov ecx, dword [esi + 0x2c]
lea edx, [esp + 0x14]
push 0
push edx
lea eax, [esp + 0x20]
push ebp
push eax
push ecx
call edi
test eax, eax
je 0x403a72
cmp dword [esp + 0x14], ebp
jb 0x403a72
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x14]
push 0
and eax, 0xffff
push edx
mov edx, dword [esi + 0x2c]
lea ecx, [esp + 0x34]
push eax
push ecx
push edx
call edi
test eax, eax
je 0x403a72
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
and eax, 0xffff
cmp ecx, eax
jb 0x403a72
mov eax, dword [esi + 0x2c]
lea ecx, [esp + 0x14]
push 0
push ecx
lea edx, [esp + 0x44]
push 0x18
push edx
push eax
call edi
test eax, eax
je 0x403a72
cmp dword [esp + 0x14], 0x18
jb 0x403a72
mov ecx, dword [esi + 0x2c]
push ecx
mov ecx, esi
call fcn.00405360
test al, al
jne 0x403a77
mov byte [esp + 0x13], 0
mov eax, dword [esp + 0x28]
test eax, eax
je 0x403a88
push eax
call fcn.0040a130
add esp, 4
mov al, byte [esp + 0x13]
pop ebx
pop ebp
pop edi
pop esi
add esp, 0x248
ret