Function at 0x409310
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x587010
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x48
mov eax, dword [esp + 0x5c]
push ebx
mov ebx, ecx
push ebp
push esi
add eax, 0x24
lea esi, [ebx + 0x170]
push edi
mov edx, dword [eax]
mov ecx, esi
mov dword [ecx], edx
mov edx, dword [eax + 4]
mov dword [ecx + 4], edx
mov edx, dword [eax + 8]
mov dword [ecx + 8], edx
mov eax, dword [eax + 0xc]
mov dword [ecx + 0xc], eax
call fcn.0056fbbb
push 0x5ec4e8
lea ecx, [esp + 0x70]
call fcn.0055718c
mov eax, dword [esp + 0x6c]
mov ebp, dword [esp + 0x68]
lea edx, [esp + 0x20]
mov ecx, dword [eax - 8]
push edx
push ecx
push eax
mov eax, dword [ebp + 8]
push eax
call dword [0x5e963c]
mov ecx, dword [esp + 0x24]
mov dword [ebx + 0x164], ecx
lea ecx, [esp + 0x6c]
call fcn.0055711e
mov eax, dword [esi]
mov ecx, dword [esi + 4]
lea edi, [ebx + 0x180]
mov edx, edi
mov dword [edx], eax
mov eax, dword [esi + 8]
mov dword [edx + 4], ecx
mov ecx, dword [esi + 0xc]
mov dword [edx + 8], eax
mov dword [edx + 0xc], ecx
call fcn.0057dd7d
mov esi, dword [eax + 4]
push 0x3e8
push str.LeftMargin
push str.SettingsEditPageSetup
mov ecx, esi
call fcn.0057e0c2
push 0x3e8
push str.RightMargin
push str.SettingsEditPageSetup
mov ecx, esi
mov dword [esp + 0x34], eax
call fcn.0057e0c2
push 0x3e8
push str.TopMargin
push str.SettingsEditPageSetup
mov ecx, esi
mov dword [esp + 0x3c], eax
call fcn.0057e0c2
push 0x3e8
push str.BottomMargin
push str.SettingsEditPageSetup
mov ecx, esi
mov dword [esp + 0x38], eax
call fcn.0057e0c2
lea edx, [esp + 0x28]
mov ecx, ebp
push edx
mov dword [esp + 0x38], eax
call fcn.0056f63b
lea eax, [esp + 0x30]
mov ecx, ebp
push eax
call fcn.0056f63b
mov ecx, dword [esp + 0x28]
mov edx, dword [edi]
mov eax, dword [ebx + 0x188]
add edx, ecx
mov esi, dword [ebx + 0x184]
mov dword [edi], edx
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
sub eax, edx
mov edx, dword [ebx + 0x18c]
mov dword [ebx + 0x188], eax
mov eax, dword [esp + 0x2c]
add esi, eax
mov eax, dword [ebx + 0x168]
sub edx, ecx
mov dword [ebx + 0x184], esi
test eax, eax
mov dword [ebx + 0x18c], edx
mov ecx, edx
je 0x4094a2
mov eax, dword [ebx + 0x164]
cdq
sub eax, edx
mov edx, dword [ebx + 0x164]
sar eax, 1
add eax, edx
add eax, esi
mov dword [ebx + 0x184], eax
mov eax, dword [ebx + 0x16c]
test eax, eax
je 0x4094c3
mov esi, dword [ebx + 0x164]
mov eax, esi
cdq
sub eax, edx
sar eax, 1
sub ecx, eax
sub ecx, esi
mov dword [ebx + 0x18c], ecx
mov esi, 1
push 0x80
mov dword [esp + 0x14], 0x20
mov dword [ebx + 0x158], esi
call fcn.00557770
mov dword [ebx + 0x15c], eax
mov dword [eax], 0
mov edx, dword [ebx]
add esp, 4
mov ecx, ebx
call dword [edx + 0x124]
mov dword [esp + 0x20], eax
mov eax, dword [ebx]
push 0
mov ecx, ebx
mov dword [esp + 0x1c], esi
call dword [eax + 0x128]
test eax, eax
mov dword [esp + 0x68], eax
jne 0x409520
mov edi, dword [ebx + 0x164]
jmp 0x4095a3
mov ecx, dword [0x5fd774]
mov dword [esp + 0x6c], ecx
mov edx, dword [ebx]
push 0
mov ecx, ebx
mov dword [esp + 0x64], 0
call dword [edx + 0x130]
mov edx, dword [esp + 0x68]
lea ecx, [esp + 0x6c]
push ecx
push edx
push 0
push eax
mov ecx, ebx
call fcn.00407240
mov eax, dword [edi]
push 0xc10
mov dword [esp + 0x3c], eax
mov ecx, dword [edi + 4]
mov dword [esp + 0x40], ecx
mov edx, dword [edi + 8]
mov dword [esp + 0x44], edx
mov edx, dword [ebp]
mov eax, dword [edi + 0xc]
lea edi, [esp + 0x3c]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x70]
push edi
mov ecx, dword [eax - 8]
push ecx
push eax
mov ecx, ebp
call dword [edx + 0x68]
mov edi, dword [esp + 0x44]
mov eax, dword [esp + 0x3c]
lea ecx, [esp + 0x6c]
sub edi, eax
mov dword [esp + 0x60], 0xffffffff
call fcn.0055711e
mov eax, dword [ebx + 0x184]
add eax, edi
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x20]
cmp eax, 1
jle 0x40972f
mov dword [esp + 0x1c], 0x80
mov eax, dword [ebx]
push esi
mov ecx, ebx
call dword [eax + 0x128]
mov edi, eax
test edi, edi
jne 0x4095e4
mov ecx, dword [ebx + 0x164]
mov dword [esp + 0x6c], ecx
jmp 0x409670
mov edx, dword [0x5fd774]
mov dword [esp + 0x68], edx
mov eax, dword [ebx]
push esi
mov ecx, ebx
mov dword [esp + 0x64], 1
call dword [eax + 0x130]
lea ecx, [esp + 0x68]
push ecx
push edi
push 0
push eax
mov ecx, ebx
call fcn.00407240
lea eax, [ebx + 0x180]
lea esi, [esp + 0x48]
push 0xc10
push esi
mov edx, dword [eax]
mov dword [esp + 0x50], edx
mov ecx, dword [eax + 4]
mov dword [esp + 0x54], ecx
mov edx, dword [eax + 8]
mov dword [esp + 0x58], edx
mov edx, dword [ebp]
mov eax, dword [eax + 0xc]
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x70]
mov ecx, dword [eax - 8]
push ecx
push eax
mov ecx, ebp
call dword [edx + 0x68]
mov esi, dword [esp + 0x54]
mov eax, dword [esp + 0x4c]
lea ecx, [esp + 0x68]
sub esi, eax
mov dword [esp + 0x60], 0xffffffff
call fcn.0055711e
mov dword [esp + 0x6c], esi
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x6c]
add eax, ecx
mov ecx, dword [ebx + 0x18c]
cmp eax, ecx
jle 0x40971a
mov edx, dword [esp + 0x10]
mov eax, dword [ebx + 0x158]
cmp edx, eax
jg 0x4096f2
mov eax, dword [esp + 0x1c]
mov esi, edx
add eax, 0x80
add esi, 0x20
push eax
mov dword [esp + 0x14], esi
mov dword [esp + 0x20], eax
call fcn.00557770
mov ecx, dword [ebx + 0x158]
mov esi, dword [ebx + 0x15c]
shl ecx, 2
mov dword [esp + 0x18], eax
mov edi, eax
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 0x15c]
push ecx
call fcn.00557799
mov edx, dword [esp + 0x1c]
mov esi, dword [esp + 0x20]
add esp, 8
mov dword [ebx + 0x15c], edx
mov eax, dword [ebx + 0x158]
mov ecx, dword [ebx + 0x15c]
mov dword [ecx + eax*4], esi
mov edx, dword [ebx + 0x158]
mov eax, dword [ebx + 0x184]
mov ecx, dword [esp + 0x6c]
inc edx
add eax, ecx
mov dword [ebx + 0x158], edx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x20]
inc esi
cmp esi, eax
mov dword [esp + 0x18], esi
jl 0x4095c4
mov ecx, dword [esp + 0x58]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x54
ret 8